A Whittier police officer was shot Monday night in a confrontation in which the suspected shooter also suffered a gunshot wound. Both were hospitalized, a law enforcement source told The Times.

The shooting occurred in the area of Pickering Avenue and Penn Street, according to the Los Angeles County Sheriff’s Department.

Their conditions were initially unknown. But the Whittier officer was immediately taken to the trauma center of Los Angeles General Medical Center, according to the source, who was not authorized to speak on the record; the suspect was also transported by ambulance to the hospital and was in police custody.

At 10:09 p.m., Whittier Mayor Joe Vinatieri said in a Facebook post the officer was “in good spirits” and thanked the various law enforcement agencies that assisted with the response.

No details on the nature of the confrontation were immediately available.

In an earlier post, Vinatieri made a public request for prayers after the shooting.

“A Whittier police officer has been shot. Please pray for the officer and the WPD family,” Vinatieri wrote. “Helicopters are flying overhead. Many other cities have sent officers to help.”