Anwar, 60, was picked by by police personnel and bundled up in a white car less than an hour before a deadline to appear at police headquarters, for questioning in the case filed by an aide on June 28.
On Monday, the police had said that Anwar had till 2 pm to come to the headquarters to answer allegations of sodomy.
Anwar's lawyer Sankaran Nair said the police had told his client that he was being arrested for investigations under Section 377 C of the country's penal code for alleged 'carnal intercourse against the order of nature'.
The arrest came hours after Anwar was questioned at the Anti-Corruption Agency headquarters in connection with a complaint he had lodged against the country's attorney general and police chief.
Anwar had dismissed the sodomy allegation levelled against him by his 23-year-old former aide Mohamed Saiful Bukhari Azlan as fabricated and took refuge in the Turkish embassy saying he feared for his life.
The People's Justice Party leader, who was once a part of the powerful ruling coalition, however, came out the next day after the government lodged a protest with Ankara's envoy.
Anwar's wife Azizah Wan Ismail, who is the president of the party, said Anwar had called her from the police car to say he had been arrested. "He asked me to go home to look after the children," she said in the Parliament lobby. Anwar was sacked from the cabinet in 1998 by then prime minister Mahathir Mohammad for allegedly sodomising his driver. The charges were overturned in 2004 and he was freed but Anwar claimed that he was framed to stop him from challenging Mahathir's leadership.Reviving his political career, Anwar guided the weak opposition alliance to an unprecedented victory in the March 8 general elections over the ruling Barisan Nasional coalition that has dominated Malaysia politics for over five decades.
The opposition now controls five states and one-third of the parliament seats.
Anwar was at the Anti-Corruption Agency headquarters in Malaysia's administrative capital Putrajaya earlier this morning where he was quizzed about his complaint accusing police chief Musa Hassan and Attorney General Abdul Gani Patail of fabricating evidence in a 1999 investigation into his assault in jail. Musa was the investigating officer and Abdul Gani led the prosecution in the case. Anwar left the headquarters saying he was satisfied with the questioning. He said the ACA had not completed its interview, but he had to cut it short to make his 2 pm appointment with the police to answer questions over the sodomy allegation made against him. Anwar said he had produced all the information required, but there just wasn't enough time. 'If I am arrested, I guess the ACA can do their follow-up interview at the lock-up,' he was quoted as saying by The Star newspaper.