In a statement issued in English, the foreign ministry said it “strongly rejects the arrival of a nuclear-powered submarine in the Guantanamo Bay on July 5, 2023, that stayed until July 8 at the US military base located there.”
The incident was a “provocative escalation of the United States, whose political or strategic motives are not known,” it added.
The ministry warned of the “danger of the presence and circulation of nuclear submarines of the United States armed forces in the nearby Caribbean region.”
In Washington, the State Department had no immediate comment on Havana’s statement.
The complaint follows a tightening of relations between Cuba and Russia, with an uptick in bilateral projects and visits by senior officials even as Moscow is engaged in a war on Ukraine.
Last month, Cuba and Russia -- both under US sanctions -- announced they would pursue closer “technical-military” cooperation.
Moscow and Havana were at the center of a global nuclear scare in 1962, when the Soviet Union stationed missiles on the island, sparking threats of an attack by the United States.
The weapons were withdrawn and a crisis averted, but Cuba has been under a US blockade ever since.
Cuba has also raised eyebrows over recent interactions with China.
The Wall Street Journal has reported that Havana was negotiating with Beijing to establish a joint military training facility on the island, and the White House said China has been operating an intelligence unit in Cuba for years -- which Havana has denied.
Cuba has repeatedly demanded the return of a 117-square-kilometer (45-square-mile) territory in US hands since 1898 and home to the Guantanamo base.
Since 2002, it has been used by the United States to house “enemy combatants” captured in the so-called war on terror following the September 11, 2001 attacks.
Last month, UN Special Rapporteur on Human Rights Fionnuala Ni Aolain said the treatment of the remaining 30 detainees at Guantanamo was “cruel, inhuman and degrading.”