NAIROBI, Kenya — The United States government is increasingly concerned about the Twitter account of the Shabab militant group of Somalia, with American officials saying Monday that they were “looking closely” at the militants’ use of Twitter and the possible measures to take in response.

American officials would not disclose what action they were considering. But some American officials said the government was exploring legal options to shut down the Shabab’s new Twitter account, potentially opening a debate over the line between free speech and support for terrorism.

Over the past two weeks, the Shabab, brutal Islamists known for chopping off hands and starving the famine-stricken populace, have been firing off pithy Twitter messages referring to their attacks and taunting the Kenyan military, which sent troops into Somalia in October to battle the Shabab.

“Your inexperienced boys flee from confrontation & flinch in the face of death,” said a Shabab post addressed to the Kenyan Army.