NASSAU, Bahamas — Controversy has trailed the first official visit of Haitian President Michel Martelly to the Bahamas this month, after he urged Haitian residents of the Bahamas to align themselves with a party serving their best interest.

His comments came just months before the Bahamas’ general elections and sparked heated public debate.

Mr. Martelly’s two-day visit to Nassau on Feb. 7, 2012 aimed to discuss business and investment opportunities being planned for Haiti. His government said it had hopes of improving the lives of Haitians through development in order to stem the migration of its citizens to other countries.

In a town meeting addressing Haitians and their descendants living in the Bahamas, Mr. Martelly encouraged attendees of Haitian descent, who have Bahamian citizenship, to vote as a bloc and align themselves with the political party that best serves their interest.

The Bahamas’ opposition leader, as well as a third political party leader, have spoken out against Mr. Martelly’s urging, arguing that it was a divisive statement and a political move by the governing party to gain votes.

High tensions over Mr. Martelly’s comments prompted the Haitian embassy in The Bahamas to release a statement explaining that it was not the president’s intention to sway the voters to any particular political party.

The Free National Movement party, which currently governs the Bahamas, recently came under heavy criticism for increasing the number of non-Bahamians to whom it grants citizenship each month. Many of the new citizens are of Haitian descent.

Bahamian Prime Minister Hubert Ingraham said in a press release that Mr. Martelly was perfectly entitled to make a statement encouraging Haitians who have become citizens of the Bahamas to support the political party of their choosing at election time.