PORTLAND — Three veterans of the wars in Iraq and Afghanistan set off on a cross-country bicycle trek from the Old Port today to raise money for the Wounded Warriors Project, a nonprofit organization that supports the mental and physical recovery of wounded soldiers.

The trio ended their fifth year of military service last week and set out on the 4,000-mile trek to Los Angeles to raise awareness for the program. They are scheduled to arrive Aug. 1.

“This is our way of giving back and saying thank you to the men and women we served alongside, who were not as lucky as us,” said Capt. Pete Phipps,of Hudson, Ohio. “They need the help.”

The program provides support to severely wounded soldiers to help them heal both physically and emotionally.

The soldiers spent more than 40 months in the combat zones in Iraq and Afghanistan. They know first hand the toll the war has taken on its soldiers.

In 2008, Phipps was deployed to serve in Afghanistan near the Pakistan border.

Phipps, Capt. Joel Glover and Capt. Daniel Marques graduated from the U.S. Military Academy at West Point in 2005. Soon after, Glover was deployed to Iraq to lead a platoon in northwest Baghdad. When he returned home, he toured Alaska and pursued adventure in skiing, climbing, fishing, camping, and biking. In 2008, Glover’s unit returned to Iraq.

Marques, of Corona, Calif., spent most of 2006 in Iraq and 2008 in Afghanistan with the 101st. Airborne Division as an intelligence officer, platoon leader, and executive officer. In between wars, he did some climbing and hiking.