A police officer has told a court in Mauritius that senior staff at the hotel where Michaela McAreavey was killed "played a dirty game" that led to the victim's husband being held as a suspect.

Yoosoof Soopun said a reading from the electronic door entry system was handed over only after persistent requests.

Two former staff members at the Legends hotel, Avinash Treebhoowoon and Sandip Moneea, are on trial for the murder of McAreavey, the daughter of the Gaelic football manager Mickey Harte. They deny the charge.

Soopun told the supreme court in Port Louis: "I just want to state that hotel management, particularly the chief security officer Mr [Mohammad] Imrit, has played a dirty game with the police. Having that information earlier to the police, there's no doubt that poor Mr John McAreavey would not have been taken to Piton police station and treated as a suspect.

"It was only on our persistent requests that we obtained the reading and came to know that a magnetic card – JMK supervisor two – has been used at 14.42 hours, some two minutes before the lady, the deceased Mrs McAreavey, had accessed the room. Then it was clear that Mr John McAreavey must be disregarded as a suspect."

Soopun said he was astonished to find Mr McAreavey handcuffed in the police station later that night. "He was crying and completely broken," he said.

The prosecution alleges that Treebhoowoon, 31, and Moneea, 42, murdered McAreavey, 27, when she interrupted them stealing from her room. The trial continues.