By Greg Botelho, CNN

(CNN)–High-profile Pastor Rick Warren tweeted Thursday that his son who shot himself late last week had bought an "unregistered gun" from "someone over the internet."

"I pray he seeks God's forgiveness," wrote Warren, a best-selling author and the head of Saddleback Church, referring to whoever sold his son the gun. "I forgive him."

https://twitter.com/RickWarren/status/322434892828917760

Law enforcement authorities have the gun they believe Matthew Warren used to kill himself, according to Orange County Sheriff's Department spokesman Jim Amormino.

Follow the CNN Belief Blog on Twitter

Amormino said he could not say from where, or whom, the 27-year-old got the weapon. But he did confirm the gun was not registered, adding that its serial number had been scratched off.

"(The fact) the serial number is scratched off ... is going to make it extremely difficult, if not impossible, to trace," Amormino said.

Matthew, the youngest of Warren's children, worked at the Saddleback Resources Warehouse, which distributes books and DVDs. He was "an important part of the church but played a quiet role," church spokeswoman Anne Krumm said.

He'd had "a fun evening" with his parents, Rick Warren wrote Saturday to the staff of his Southern California megachurch, before he committed suicide "in a momentary wave of despair."

Matthew Warren was found dead of a self-inflicted gunshot wound at his home in Mission Viejo, California, late Friday afternoon, the Orange County Coroner said. The autopsy completed Monday put the time of death at around 10 a.m. Friday.

"Matthew was an incredibly kind, gentle and compassionate young man whose sweet spirit was encouragement and comfort to many," the church said in a statement. "Unfortunately, he also suffered from mental illness resulting in deep depression and suicidal thoughts. Despite the best health care available, this was an illness that was never fully controlled, and the emotional pain resulted in his decision to take his life."

CNN’s Belief Blog: The faith angles behind the biggest stories

Rick Warren is a pioneer of the megachurch movement who looked to translate traditional evangelical messages to a wider audience.

Warren founded Saddleback with his wife 33 years ago and wrote "The Purpose-Driven Life," a Christian self-help guide that became a mainstream best-seller. He also gave the invocation at President Barack Obama's 2009 inauguration.

CNN's Eric Marrapodi contributed to this report.