Ryan Dunn tweeted a photo of himself drinking with friends just hours before a car crash that left him dead in Pennsylvania. Photo: twitter

WEST GOSHEN, Pa. — Ryan Dunn, one of the stars of the TV and movie series “Jackass,” was killed early Monday in a single-car accident in Pennsylvania. He was 34 years old.

“Today I lost my brother Ryan Dunn,” said “Jackass” star and co-creator Johnny Knoxville on Twitter after news of Dunn’s death broke. “RIP Ryan, I love you buddy.”

Police said Dunn crashed his 2007 Porsche while driving in West Goshen, about 35 miles (56 kilometers) west of Philadelphia, at 2:38am Monday, TMZ reported.

Dunn and his passenger, who has not yet been identified, “died as a result of injuries sustained in the accident,” according to police.

West Goshen police said Dunn’s Porsche was found in a wooded area off the road, “fully engulfed in flames.” They said speed may have been a contributing factor in the accident. An investigation into the crash is ongoing.

Dunn spent nearly four hours at a bar in his hometown of West Chester, two miles (3.2 kilometers) west of West Goshen, before getting behind the wheel, TMZ reported.

A few hours before his death, Dunn also posted a photo on Twitter of himself drinking with two other men.

According to TMZ, a friend of Dunn’s said he drank three light beers and three “girly shots” at the bar but said he was “not too drunk to drive.” Another witness told the website Dunn “had a lot to drink” and described him as being “wasted,” however police have not said if alcohol was suspected as a factor in the crash.

Dunn appeared in all three seasons of the “Jackass” TV series on MTV and all three movies, most recently “Jackass 3D” in 2010. He was also a host of the series “Proving Ground,” which premiered June 14 on cable network G4.

“We are devastated by the tragic loss of Ryan Dunn — a beloved member of the MTV family for more than a decade,” MTV Networks Music/Films Group President Van Toffler said in a statement. “He made us all laugh and had the tireless enthusiastic approach to life of your favorite middle school friend. Our thoughts and deepest condolences are with Ryan’s family and friends.”

April Margera, mother of Dunn’s “Jackass” costar Bam Margera, told Radar Online that Dunn was like her “extra son.”

“I have not been able to talk with Bam as he is in Arizona but I cannot believe that his friend is dead,” she said. “I felt like I lost one of my own sons when I heard that Ryan Dunn had died.”