A stunt pilot flying a single-engine experimental aircraft that had performed in an air show in northern Maine earlier in the day crashed Sunday evening in Standish after it experienced a mechanical malfunction, authorities said.

But the pilot, William “Billy” Werth, 43, of McCordsville, Indiana, suffered only minor injuries and walked away from the crash, which occurred just off busy Route 35.

Authorities said Werth was able to avoid striking oncoming vehicles but his airplane was destroyed by the violent landing.

Sgt. James Estabrook of the Cumberland County Sheriff’s Office said Werth was flying to Sanford Seacoast Regional Airport to refuel his single-seater craft when the plane started having mechanical problems.

Werth attempted to land the plane on Route 35 – also known as Northeast Road – around 5:30 p.m., Estabrook said in a news release. As he tried to set down on the two-lane highway, his aircraft struck trees and telephone wires. Werth had lost control as the plane started to go down and as he tried to avoid hitting motor vehicles. The red and white, amateur-built plane crashed in a ditch beside the highway.

The road was shut down to traffic soon after the crash and did not reopen until 9:15 p.m., according to the Standish Police Department.

Witnesses told WCSH-TV in Portland that the pilot walked around the plane before he was taken away by an ambulance, and Estabrook described Werth’s injuries as “minor.”

Werth was taken by Standish ambulance to Maine Medical Center in Portland, where he was treated and released Sunday night, according to a hospital spokeswoman. Werth could not be reached for comment.

“It’s not all that remarkable that he could land that light an aircraft in such a tight area,” said David Fernald Jr., executive director of the Acadian Heritage Air Show in Frenchville, a town near Fort Kent in Aroostook County. “He did a fantastic job of not hitting anyone.”

Fernald said Werth had performed on Sunday with the Iron Eagle Aerobatic Team during the third annual air show. The air show started Saturday and ended Sunday.

Fernald said Werth was heading home when the crash occurred. He called Werth “an excellent, very accomplished” pilot.

On his Facebook page, Werth describes himself as the owner of Billy Werth Airshows.

The Federal Aviation Administration Registry says that Werth’s company is based in McCordsville, Indiana. FAA records say his model Eagle 540 plane was manufactured seven years ago by Birchler Boyd.

Jim Peters, an FAA spokesman, issued a brief statement Sunday night about the crash, which will be investigated by the FAA and National Transportation Safety Board.

Peters said the airplane left the Northern Aroostook Regional Airport and was heading to Sanford to refuel when the crash took place.

The cause of the crash appears to be “engine-related,” according to Peters.

Werth’s website said he and his brother, Dave, perform “hard-charging aerobatics.” On the website is a photograph of an airplane and an invitation.

It reads: “If you have not tried this, you definitely need to add it to your bucket list. Fly upside down, spins and rolls! Way more awesome than a roller coaster! Buy a ride for yourself, or someone else. Anytime is a great time to fly.”