AP Photo/Michael Probst, File

Toronto - A Canadian accused of hacking Yahoo! email accounts on behalf of the Russian government appeared in court seeking bail ahead of a hearing to determine whether he should be extradited to the US for trial.

Karim Baratov, 22, was one of four people indicted by the US government last month and charged with working for Dmitry Dokuchaev, a hacker for Russia’s FSB security service - the successor to the KGB. It’s not clear whether Baratov knew he was working for the FSB, but his father denied any such connection.

Ontario Superior Court Justice Alan Whitten in Hamilton didn’t rule on the bail request Wednesday and said he would hear closing submissions from the lawyers on April 11.

The 2014 Yahoo hack affected at least 500 million accounts, damaging the company’s reputation and threatening a takeover bid from Verizon Communications. Verizon cut its offer by $350 million to $4.48 billion following news of the breach.

Baratov, who was born in Kazakhstan and is a Canadian citizen, entered court wearing black sweatpants, black t-shirt, with his ankles chained. He put on a beige blazer as he sat down in the prisoner’s box.

He told the judge he lived with his parents until 2015. He said he had a Mercedes and a BMW while attending high school and started his own business protecting web servers from hackers in 2014. He said earned C$10 000 ($7 500) a month that year, less in the ensuing years.

At 20, Baratov said he moved into a C$642 000 home, and over time added a C$155 000 Lamborghini, a Porsche 911, an Aston Martin and another BMW to his car collection. His parents helped pay for the cars, he said.

Baratov said he had about C$260 000 of equity in his home when it was sold following his arrest. He said he had no money in his personal bank account and about C$5 000 in his business bank account when he was arrested. Police found about C$31 000 in cash when they searched his home.

Read also: Yahoo! hacking probe accelerates

According to the US, Baratov was paid to gain access to 80 email accounts, including 50 Google accounts, belonging to Russian politicians and bureaucrats. He used spear-phishing attacks to target his victims, using fake emails to compel them to provide sensitive information, and would then sell their passwords to Dokuchaev for $100 each, according to the Justice Department.

The hackers were allegedly looking for people of political interest and others who might be vulnerable to financial fraud, and the list of victims included the White House and its military and diplomatic corps. They ultimately stole the contents of 6 500 Yahoo accounts in an attack the company called "state-sponsored."

Baratov’s father, Akhmet Tokbergenov, said through an interpreter that his son didn’t work for any Russians or any government.

"My son knows about my attitude toward Russian special authorities and it’s absolutely negative,” Tokbergenov told the judge. “He knows why we moved to Canada. I didn’t want to live in that environment.”

Baratov’s father offered to put up C$845 000 equity in his home as surety. He said it represented his life’s savings and he will make sure his son doesn’t flee.

"I will create such conditions that maybe even jail will look like paradise to him," Tokbergenov said.