Los Alamitos Mayor Dean Grose faced calls for his resignation when he forwarded an e-mail showing a watermelon patch on the White House lawn under the title:
Grose said he wasn't aware of the racial stereotype that blacks like watermelon.
Grose said in a letter dated Monday that he is resigning from the City Council "for the love of my community and the health and well-being of my family."
Residents and city officials gathered later that night at a council meeting to criticize the mayor's actions.
"This jewel of a city ... is to be tainted by one person, and I point that out, it is one person that made that decision and it was a very poor decision," said former Mayor Catherine Driscoll.
City Commissioner Pete Carvajal added, "Should we as a city be smeared with the stain of racism because of one careless and ignorant action on the part of one of our elected officials?"
In Los Alamitos, the mayor is a council member elected to the post annually by other council members. Grose's council term would have expired in 2010.