Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Brazilian prosecutor has opened a criminal investigation into investments made by two state pension funds in a luxury Rio de Janeiro hotel that is part of the Trump franchise, according to a court filing reviewed by Reuters on Tuesday.

The $40 million investment by the two small funds in the hotel's developer "required investigation" due to its size, structure and high level of risk, Anselmo Lopes, a federal prosecutor in Brasilia, said in the document dated October 21 that opened the inquiry.

Lopes said the pension fund for state IT firm Serpro and the Igeprev fund for employees of Tocantins state invested the money in the developer, LSH Barra Empreendimentos Imobiliários, which built the Trump Hotel Rio de Janeiro.

Republican presidential nominee Donald Trump speaks during the opening of the Trump International Hotel in Washington, DC on October 26, 2016. / AFP PHOTO / MANDEL NGANMANDEL NGAN/AFP/Getty Images MANDEL NGAN / AFP - Getty Images

"Investing amounts of such size, for these (relatively small) pension funds, breaks principles for diversification and liquidity," Lopes said in the document.

"It is necessary to verify if the favoritism shown by the pension funds towards LSH Barra Empreendimentos Imobiliários SA and The Trump Organization was due to illicit payments and bribes," Lopes said in the 15-page document.

The investigation is part of a wider probe into fraud at Brazilian state pension funds in which bribes were allegedly paid to secure investments.

Related: Trump Hotels Are Taking a Beating During His Campaign

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Trump Organization and LSH Barra Empreendimentos Imobiliários SA, the sole owner of the hotel, denied any wrongdoing. Serpros did not respond to requests for comment.

The Trump Hotel Rio de Janeiro, a beachfront property with 170 rooms near where the Olympic Park was located, is managed by the real estate company of Republican presidential candidate Donald Trump, although no money from the Trump Organization was invested in the project.

Prosecutor Lopes last week also said the Trump Organization may have benefited "suspiciously" from a massive redevelopment of Rio de Janeiro's port, where it plans to build a series of office towers. Lopes provided no proof of his suspicions, and did not elaborate on what he meant.

The Trump Organization said it had not been informed of either investigation and said all their business dealings had strictly complied with Brazilian law.

"We have no relationship or involvement with these pension funds," said Alan Garten, executive vice president and general counsel at The Trump Organization. "We have an arm's length agreement with the developer where we were hired to provide a service.

"In time, I think the investigator will realize that these types of things wouldn't involve us and don't involve us," he added.

Garten said the Trump Organization performs extensive due diligence on all its deals using an external firm, which he declined to name.

LSH Barra Empreendimentos Imobiliários said in a statement the unfinished project was a legitimate venture valued at between $78 million and $100 million that would render a return on investment.

LSH said the stakes held by the pension funds were in line with Brazilian law and that it was ready to help prosecutors with their investigation.

"We regret being connected to acts and procedures that we know nothing about and never participated in," the statement said.

In the court filing, Lopes said the Igeprev pension fund's 54 million real investment in LSH Barra was "highly suspicious" because the fund also bought debt linked to the developer, effectively doubling its exposure to the project.

Jacques Silva, who took over as head of Igeprev after the investments were made, agreed the investment was "suspicious" and said his fund was at risk of losing 1 billion reais due to bad deals struck by the previous management, of which the Trump Hotel was not the worst.

Reuters was not able to independently verify Silva's allegations. It was not immediately possible to contact members of Igeprev's previous management team.

Plans to build the hotel were announced in 2014, and it was meant to be ready in time for the Olympics held in August. Delays meant the hotel was only partially open during the Games, however, with less than half of its rooms available.

Silva said the luxury hotel had not been a good deal for his fund because it is a risky long-term investment with no dividends.

"I hope the police and prosecutors get to the bottom of it. ... It's public workers' money," Silva said.