HONG KONG, June 5 (Reuters) - Hong Kong's top court on Monday overturned the conviction of journalist Bao Choy, who had been accused of making false statements to access vehicle registration records for a documentary about an attack on pro-democracy protesters in 2019.

The July 21, 2019, attack in the northern Yuen Long district by more than 100 people wearing white T-shirts and wielding sticks and poles was one of the most violent scenes of the city's unrest. The assailants beat bystanders, journalists and protesters.

For the documentary "7.21 Who Owns the Truth," Choy, who worked for local broadcaster RTHK, obtained data on the ownership of cars seen in video footage that night, hoping to trace those behind the assault and highlight the alleged slow response of police.

A court fined Choy, a former freelance journalist, HK$6,000 ($765) in 2021 for making false statements to obtain the vehicle ownership records. Choy had pleaded not guilty.

In a written judgment on Monday, the Court of Final Appeal said a "substantial and grave injustice" was done to Choy by inferring that she knowingly made false statements when accessing the vehicle registration record database.

Choy, speaking outside the court, said the ruling was important for investigative journalism.

"More importantly, it states the importance of the constitutionally protected freedom of the press and speech. That’s the biggest significance of today's ruling," she said.

During the appeal, her lawyer Derek Chan argued that people could only choose from three options on the app; Choy chose "other traffic and transportation matters."

The other options were "transport-related legal proceedings" or the "sale and purchase of vehicle."

Chan also argued that the prosecution failed to mention media freedom, which is protected under the city’s mini constitution.

Convicting Choy in 2021, lower court judge Ivy Chui said in her ruling that "the regulations are not intended to allow the public to obtain vehicle particulars without limitations" and that "interviewing and reporting are not related to traffic and transport purposes."

The ruling on Monday cannot be appealed.

($1 = 7.8388 Hong Kong dollars) (Reporting By Justin Fung and Jessie Pang; Editing by Anne Marie Roantree, Simon Cameron-Moore and Gerry Doyle)