The U.S. Embassy said its consulate in Lagos was shut down Thursday "because of a security issue of mutual concern to the United States Mission in Nigeria and the government of Nigeria."
U.S. Embassy officials in the Nigerian capital of Abuja would not give any further details, but the statement said the consulate would also remain closed on Friday.
"The embassy is reacting to a security incident and we thought it prudent to close," a spokesman at the U.S. embassy in Abuja told the BBC. Lagos is the country's largest city.
The Foreign Office in London said Britain had closed its Deputy High Commission in Lagos following the closure of the nearby U.S. Consulate.
The threat was of an "international dimension," a diplomat told the BBC.
A spokesman for the Foreign Office said the closure was a precaution, adding that he had no details on the nature of the security concerns that led to the U.S. action.
Al Qaeda chief Osama Bin Laden purportedly marked Nigeria for liberation in a release posted on the Internet last year. The country of around 130 million people is roughly evenly split between Christians and Muslims.
Political, ethnic and religious violence has claimed more than 10,000 lives since President Olusegun Obasanjo came to power in 1999, but the country has not experienced any terrorist bombings.