The Bahamas has officially warned young black men to “exercise extreme caution” when visiting the US after a week in which two black men have been killed by police in questionable circumstances.

The islands' Ministry of Foreign Affairs said it has noted the “tensions” in the US, where five police officers were shot dead in Dallas by a black former Army veteran, who was then killed by police using a robot carrying a bomb.

“In particular young males are asked to exercise extreme caution in affected cities in their interactions with the police. Do not be confrontational and cooperate,” it said in a statement.

“Pay attention to the public notices and news announcements in the city that you are visiting."

The ministry said visitors not to get involved in demonstrations and to avoid crowds. It also asked young black men to get in touch with the Bahamas’ consular offices in the US rather than deal with any potential conflict themselves.

The advice was criticised by a law professor. Marjorie Cohn, of the Thomas Jefferson School of Law, said: “I don’t think it’s victim blaming, but it’s advising them [black men] to the extent that they could become paranoid.

“A lot of the black men stopped by the police or who are racially profiled are doing nothing wrong, illegal or out of the ordinary.

"They are 'driving while black' and 'walking while black' and nothing they do can prevent that, unless there are structural changes to policing.”

Professor Cohn said citizen review boards should be introduced to act as a police watchdog to help reduce the number of shootintgs. She also called for training for police in different cultural practices and how to use humane techniques as a first line of defense.

The Bahamian government issued the advice after the US police killed two black men this week, Alton Sterling in Baton Rouge, and Philando Castile, in Minneapolis, in circumstances which have caused international outrage.

Mr Sterling was selling CDs outside of a convenience store in his usual spot when police slammed him to the ground and shot him. Mr Castile was shot dead during a routine traffic stop in front of his girlfriend and her daughter.

Dallas police chief David Brown and Dallas mayor Mike Rawlings (Rex Features)

At a peaceful protest in Dallas against their deaths, five white police officers were killed and six more were wounded by Micah Johnson, a black former Afghanistan veteran who reportedly said that he wanted to kill white police officers.

Within 24 hours, two more men opened fire on police officers on a highway in Tennessee and in a house near Ballwin, Missouri.

The United Arab Emirates has also warned its citizens not to wear traditional Muslim dress when visiting the US following a spate of Islamophobic attacks.

Reverend Graylan Hagler, from the Plymouth Congregational United Church of Christ in Washington DC, which just held a meeting on police violence, said the Bahamian advisory reflected the “reality” in the US.

“Black parents have to advise their children differently than white parents,” he said.

The US police does not have any federal agency that requires them to submit data on shootings, so there are no official numbers on how many black people are killed by law enforcement.

“It could be five, it could be 10 [a week], who knows,” said Reverend Hagler.

“The tensions, the racial tensions, have been emboldened by the presidential rhetoric, particularly by Donald Trump. He has staked out this territory and emboldened those that already have this latent idea [of racism].