The prominent Chinese artist and dissident Ai Weiwei, the highest-profile anti-government critic arrested during a months-long crackdown on activists, was released on bail late Wednesday and allowed to return home.

The release was first reported by China’s official news agency. One of Ai’s lawyers, Liu Xiaoyuan, said that he sent a text message to Ai shortly after 10 p.m. in Beijing to greet him on his return home and that the artist replied, thanking him. The Associated Press later ran photos of Ai in a blue shirt, looking fit and shaking hands after his release.

The Reuters news service quoted Ai as saying in English, “I’m sorry I can’t [talk], I am on probation, please understand.”

Xinhua, the official Chinese news agency, said Ai was released “because of his good attitude in confessing his crimes as well as a chronic disease he suffers from.” Since his arrest on April 3, Chinese authorities have publicly accused Ai of evading taxes on a company he controls, Beijing Fake Cultural Development Ltd.

Rumors of Ai’s release first began circulating on Twitter, but his family members, including his sister, Gao Ge, said they had heard nothing official and were skeptical of the initial reports.

Gao denied that Ai was guilty of evading taxes. “He didn’t evade the tax,” she said. “Never. It’s just their excuse.”

Liu, the lawyer, said, “Tax evasion doesn’t sound like a very convincing excuse.” He said the case was being handled by the public security bureau, which deals with internal threats, and not the tax bureau.

Ai was arrested at Beijing’s main airport as he was about to board a flight to Hong Kong. He was kept in an undisclosed location, and his wife was allowed to see him only once, on May 15.

Ai was only the latest in a list of dozens of Chinese activists — human rights lawyers, bloggers, writers and other dissidents — who were detained this year after anonymous Internet calls for a Middle East-style “jasmine revolution” against the country’s ruling Communist Party authorities. Ai’s arrest touched off an international firestorm of criticism because of his prominence as China’s leading contemporary artist.

Just before his arrest, the increasingly outspoken Ai announced plans to set up a new studio in Germany because of free-speech restrictions in China.

The United States, the European Union and various human rights groups had called for his release.

State Department spokesman Mark Toner said Wednesday that Ai’s release was welcome. “It’s always a good thing when such an individual . . . who was only in prison for exercising his internationally recognized human rights, is released. But there’s obviously more individuals who are being held,” he said. “We want to see the release of all these people.”

Ai was set free just days before the vice foreign minister, Cui Tiankai, leaves for a bilateral meeting in Hawaii with U.S. Assistant Secretary of State Kurt Campbell. The meeting is to focus on tensions in the Asia-Pacific region.

Washington Post researcher Zhang Jie contributed to this report.