Two alleged hackers accused of locking several Apple devices for ransom were arrested by the Interior Ministry's cyber crime department in Russia.

Russian authorities have arrested two hackers accused of invading Apple device users' software and blocking people out of their devices. The arrest is a crucial one as reports of ransom threats from hackers blocking access to iPhones, iPads and other Apple devices created havoc among people for the past two weeks. The victims could only see a message that the device had been hacked by Ogel Plis and to send money through a PayPal account in exchange for a release. The Directorate K also released a statement Monday, confirming the arrest

According to the latest report from Re/Code, the notorious hackers are in the custody of the Russia's Interior Ministry's cyber crime department, Directorate K. The department arrested the alleged hackers after they gave self-incriminating evidence that linked the duo to the cyber crime. The hackers were first identified as they tried to withdraw cash from  ATMs using bank cards associated to the one where victims were asked to send the money. The surveillance footage led to the identification of the criminals and consequently led to their arrest.

One of the hackers was a teenager and another in early 20s, both residents of southern Moscow.

According to the report, police found computer hardware, SIM cards, phones, and a guide on hacking techniques in the suspects' apartments. The officials also found that the hackers used two methods to exploit the users' Apple accounts to extort them.

"The first involved gaining access to the victim's Apple ID by means of the creation of phishing pages, (gaining) unauthorized access to email or using methods of social engineering," the statement reads, according to Re/Code. "The second scheme was aimed at attaching other people's devices to a prearranged account by offering Apple IDs with media content for lease on the Internet, which enabled the suspects to gain control of the devices."

One of the suspects was previously linked to another extortion crime of stealing neighbors' license plates and selling back to them.

As a precautionary step, Apple advised all Apple users to change their iCloud password and set up two-factor authentication for enhanced security of the accounts.