The US Treasury Department's inspector general has determined Jay Z and Beyonce's fifth-anniversary trip to Cuba last year was legal under rules allowing educational travel to the island.

The music superstars angered several Republican politicians in Florida with their four-day visit to Havana, which saw them eating in some of the city's high-end private restaurants and touring colonial Old Havana while Jay Z puffed on a Cuban cigar.

Washington's 51-year embargo makes it illegal for US citizens to visit Cuba for mere tourism, although tens of thousands of Americans travel to the island each year on academic, religious, journalistic or cultural exchange licences. The inspector general's office said in a report that the couple visited an art school and a local theatre group, helping make their trip a legal educational exchange.