A website for the US Marine Corps has been hacked with a post attributed to the Syrian Electronic Army that criticised US President Barack Obama and called American soldiers "brothers" of the Syrian army.

The message said Marines should be allies with forces fighting for Syria and showed five people dressed in army fatigues holding signs that said they wouldn't fight for al-Qaeda.

Hacked: The Syrian Electronic Army claimed responsibility for a hack on the US Marines website. Credit:Louie Douvis

"Obama is a traitor who wants to put your lives in danger to rescue al-Qaeda insurgents," according to the posting on the website, marines.com. "Marines, please take a look at what your comrades think about Obama's alliance with al-Qaeda against Syria."