A truck driver from Fitzwilliam is accused of driving his 18-wheel tractor trailer while intoxicated after a crash early Saturday morning in Bedford. James Baldwin, 47, faces charges of aggravated driving under the influence, conduct after an accident, and possession of an open container of alcohol.

Police said an officer who was parked in the center median of Route 101 before Route 114 saw a tractor trailer turn left onto 101 and travel west. Shortly after, the officer heard a crash and scraping sound and saw the truck hit a guard rail near Old Bedford Road before continuing to drive erratically, including swerving in traffic, Bedford police said in a news release.

After stopping Baldwin on the road, the officer saw he had bloodshot eyes, was sweating profusely, and his breath smelled of alcohol, police said.

He failed multiple sobriety tests, and a breath test showed he was over the legal blood-alcohol limit, police said, although they did not specify his level. They also said they found an open can of beer in his truck.

Baldwin was released on personal recognizance with a court date of July 9.

“I’m thankful that one of our officers was nearby and able to apprehend this individual before he potentially inflicted further damage or potentially serious injury to a fellow driver,” Bedford Police Chief John J. Bryfonski said in the release.