Apple did "exactly the right thing" by refusing a request from the U.S. government to create a backdoor to access a terrorist's locked iPhone, billionaire Mark Cuban wrote in response to the encryption controversy this week.

"Amen. A standing ovation," Cuban wrote on his personal blog, heaping praise upon Apple and its chief executive, Tim Cook, for refusing to comply with the FBI's order. In his view, if Apple were to comply, it would open the doors for countless situations in the future where the government could point to this case as a precedent.

"We must stand up for our rights to free speech and liberty." - Mark Cuban

"Every tool that protects our privacy and liberties against oppression, tyranny, madmen and worse can often be used to take those very precious rights from us," Cuban said. "But like we protect our 2nd Amendment Right, we must not let some of the negatives stand in the way of the positives. We must stand up for our rights to free speech and liberty."

Cuban believes American citizens should begin pushing their representatives to pass a law that limits the circumstances under which companies can be compelled to help the government break into a device. He proposed a series of four points that would justify such an instance:

That the incident in question be declared an Act of Terrorism, with casualties

That there is reason to believe the device was possessed by a participant in the incident

The device must have been on location for the incident

The terrorist who owned the device must be deceased

Cuban admitted that the subject is "not an easy topic," but he believes an open discussion should be had for America to decide how to protect its citizens while also protecting personal liberties and security.

The open letter from Cuban joins a number of other high-profile names who have sided with Apple in its opposition to the government. Facebook, Twitter, Google and Microsoft have also expressed support for Apple.

The controversy began Tuesday, when a U.S. magistrate judge ordered Apple to comply with FBI requests to help extract data from an iPhone owned by one of the shooters involved in the December terrorist attack in San Bernardino, Calif. The device in question is an iPhone 5c that was password protected by the gunman, and is set to erase a stored decryption key after ten unsuccessful login attempts.

Apple Chief Executive Tim Cook responded with his own letter on Wednesday, saying that the creation of a backdoor tool to access a locked iPhone could open the flood gates for future issues, rippling well beyond the investigation into the San Bernardino shooting. The terrorist attack resulted in 16 deaths and 24 injuries.