Photo via Facebook.

Photo via Facebook.

The San Bernardino County (Calif.) Sheriff Department identified Jeremiah MacKay as the deputy who was killed while attempting to apprehend fugitive ex-LAPD cop Chris Dorner.

Sheriff John McMahon confirmed the line-of-duty death at a 4 p.m. press conference Wednesday. Deputy Alex Collins was seriously wounded in the intense gun battle with Dorner at a remote Big Bear cabin.

Detective MacKay, 35, joined the department in 1998. He had served as a field training officer and was assigned to the Yucaipa Station. He was quoted in an Associated Press story on Saturday about the Dorner manhunt, reports the San Bernardino Sun.

"This one you just never know if the guy's going to pop out, or where he's going to pop out," he said. "We're hoping this comes to a close without more casualties. The best thing would be for him to give up."

Detective MacKay leaves behind a wife and two children.