PORTLAND, Maine — Two Maine fire departments are receiving federal grants totaling more than $400,000 to bolster their firefighting ranks.

The Federal Emergency Management Agency has granted $234,000 to the Ellsworth Fire Department and nearly $197,000 to the department in North Yarmouth.

The money can be used to recruit, hire and retain firefighters.

The funding comes from what is known as the Staffing for Adequate Fire and Emergency Response — or SAFER — grant money.