The second of two Los Angeles County sheriff’s deputies shot in an ambush attack has been released from the hospital, the department said Monday.

The 31-year-old woman is resting, along with a 24-year-old man who was shot in the head. He was discharged last Wednesday, authorities said.

Both deputies underwent surgery.

“They both have a long road to recovery and #LASD appreciates your continued prayers and all the support,” a Sheriff’s Department tweet said.

The search continued to identify an attacker who walked up, pulled a handgun and opened fire through a window as the deputies sat in their parked patrol car on the evening of Sept. 12 at a transit center in the Los Angeles suburb of Compton.

Authorities have said both were shot several times and that the wounded woman helped save her partner’s life by applying a tourniquet to his arm.

The shooting was recorded on surveillance video but no suspect has been identified. A reward for information leading to an arrest has grown to $700,000.

President Donald Trump this week made phone calls to the deputies to wish them a speedy recovery, according to a Facebook post Saturday from the Sheriff’s Department Transit Services Bureau.

The female deputy was shot in the jaw. She couldn’t speak but wrote down her response to Trump, which was relayed by a sheriff’s sergeant at her bedside, the post said.

The post showed the deputy, her face blurred and her arms heavily bandaged, lying in an intensive care ward hospital bed. Her husband was also in the room.