Apple just won an important battle over the issue of privacy rights as the judge in charge of the case ruled in favour of the company. Thus, Apple’s four months of refusal to comply with the United States government’s request of unlocking an encrypted iPhone seemed to have paid off.

The battle has gone public following a judge order in February which forced the company to help the prosecutors in finding an access to an iPhone used by one of the suspects in the San Bernardino attack. However, Apple had then sought a Brooklyn court to fight for the security of the device that the alleged drug dealer used.

Apple emerged victorious on Tuesday as stated in the 50-page opinion of Judge James Orenstein. The judge demanded that the government back off in compelling the company to access the phone of a drug dealer because the request is impractical and excessive. According to Orenstein, the move would be pointless and is nothing but an act offensive to the law.

In 2015, Apple decided to stop co-operating with the prosecutors after helping them encrypt around 70 iPhones, saying that the company will no longer assist the government with such activities.

With the recent San Bernadino attack in December 2015 that killed 14 people, the FBI asked Apple to unlock an iPhone used by suspect Syed Rizwan Farook. The Bureau is confident that the phone of Farook is the key to solving the mystery behind his 18-minute rampage.

Meanwhile, other big names in the tech industry defended Apple following the California order. Microsoft announced their filing of a legal brief to support Apple while Chief Executive Officer Sundar Pichai of Google noted that the request of the government may create a precedent, Bloomberg reported.

Apple can use the court’s decision as the company’s legal basis to defy the government’s order especially if the issue reaches the Supreme Court, Stuff reported.