PORT-OF-SPAIN, Trinidad (AP) — A Jamaican woman won damages against the government of Barbados on Friday over her treatment at the airport as she tried to enter the country.

The Caribbean Court of Justice awarded Shanique Myrie the equivalent of nearly $38,000 and ruled that she had been wrongfully denied entry into Barbados.

A panel of judges determined that Myrie had been subjected to a "humiliating cavity search," unlawfully detained and improperly denied entry.

The court rejected her claim that she had been discriminated against because of her nationality, deciding instead that Barbados had violated a treaty allowing the free movement of citizens among Caribbean Community member states. She had been seeking the equivalent of $500,000, in part to compensate for what she said was psychological trauma.

The Caribbean Court of Justice, established as the court of appeal for Caribbean Community member states in 2001, is charged in part with enforcing the treaty. The government of Barbados argued that the treaty does not prohibit member states from ensuring that people meet the requirements for entry.

Sharon Saunders, the Jamaican high commissioner to Trinidad and Tobago and Barbados, said the court decision was "a landmark" and placed limits on the power of immigration officers.

"In principle, this has been a victory for Shanique Myrie because it validated her claims and that was indeed the objective. The award of the damages was secondary," Saunders said outside the court's headquarters in Port-of-Spain.

Myrie was stopped at the Grantley Adams International Airport in Barbados in March 2011 by a police officer who suspected she was a drug courier. Immigration authorities detained her overnight because she allegedly provided false information about where she would stay while in the country and then expelled her.

The police officer who questioned Myrie at the airport testified in the case, denying that she mistreated the woman, made derogatory comments about Jamaicans or subjected her to a cavity search.