More than $2 million in federal funds targeted to support homeless and at-risk military veterans will be allocated to three Maine agencies over the next several months.

U.S. Sens. Susan Collins and Angus King announced the grant award Tuesday. The funds will be used to promote housing stability by providing services such as mental health care and temporary financial assistance.

Preble Street in Portland will receive $1.6 million and Washington-Hancock County Community Agency, or WHCA, will receive $290,000. Veterans Inc. in Lewiston also will receive funding, but the exact amount has not been determined because its parent organization in Massachusetts will have to decide how to disburse the $2 million it received to its New England branches.

“The brave men and women who have served our country and risked their lives for our freedom deserve the most comprehensive and accessible support programs available,” Collins and King said in a joint statement. “While there is still a long road ahead in the fight to end veteran homelessness, this funding is an important step forward in that critical endeavor.”

Preble Street was founded in 1975 and operates programs designed to end hunger, homelessness and poverty. Veterans Inc. is the largest provider of support services to veterans and their families in New England. WHCA was established in the 1960s as part of President Lyndon Johnson’s War on Poverty legislation.