WASHINGTON (Reuters) - The U.S. State Department on Monday warned Americans to consider carefully whether they need to travel to Bangladesh following a series of attacks claimed by Islamist militants.

"The U.S. government assesses that the terrorist threat is real and credible," the department said in a statement.

On July 1, at least five Bangladeshi men stormed the Holey Artisan Bakery, a cafe popular with foreigners, businessmen and diplomats, and killed 20 customers, including Italians, Japanese, Indians and a U.S. citizen. Islamic State said it was responsible for the attack.

The department said it also authorized the voluntary departure of family members of U.S. government personnel posted to the U.S. Embassy in Dhaka. The embassy remains open, the statement said.

Islamic State and al Qaeda have made competing claims for a series of killings of liberals and members of religious minorities in Bangladesh in the past year. The government has dismissed those claims and insists that the violence is homegrown.

(Reporting by Mohammad Zargham; Editing by Lisa Von Ahn)