RIO DE JANEIRO, Feb 27 (Reuters) - Two Iranian warships docked in Rio de Janeiro on Sunday after Brazilian President Luiz Inacio Lula da Silva's government granted permission despite pressure from the United States to bar them.

The IRIS Makran and IRIS Dena warships both arrived on Sunday morning, Rio's port authority said in a statement.

Reuters earlier this month reported that Brazil had bowed to U.S. pressure and declined Iran's request for the vessels to dock in Rio in late January, in a gesture from Lula as he flew to Washington to meet U.S. President Joe Biden.

However, with Lula's trip over, the ships have been allowed to dock. Vice Admiral Carlos Eduardo Horta Arentz, the deputy chief of Brazil's Naval Staff, gave his approval for the ships to dock in Rio between Feb. 26 and March 4, according to a Feb. 23 notice in the official gazette.

The U.S. Embassy in Brasilia did not immediately respond to a request for comment.

The Brazilian Navy authorizes a foreign vessel to dock in Brazil, but only after authorization from the foreign ministry, which takes into account the requesting embassy's petition and logistics.

The presence of the Iranian warships on Brazilian shores continues to irk the United States as it seeks to build closer ties with Lula's administration, which came into office on Jan. 1.

In a Feb. 15 press conference, U.S. Ambassador Elizabeth Bagley urged Brazil not to allow the ships to dock.

"In the past, those ships facilitated illegal trade and terrorist activities, and have also been sanctioned by the United States. Brazil is a sovereign nation, but we firmly believe those ships should not dock anywhere," she said.

Diplomacy with Iran was one of the highlights of Lula's attempts to bolster Brazil's international standing during his previous presidential terms. He traveled to Tehran to meet then-President Mahmoud Ahmadinejad in 2010 as he sought to broker a nuclear deal between Iran and the United States.