HONG KONG — The Chinese artist Ai Weiwei said he was given back his passport on Wednesday after being barred from traveling abroad since he was detained in 2011 in Beijing.

“Today, I received a passport,” he wrote onTwitter and Instagram, along with a photograph that showed him holding the burgundy-colored Chinese travel document.