A motorist collapsed and died today after he abandoned his SUV, went berserk on a Brooklyn street and tried to carjack other drivers, police said.

Ricky Wright, 41, of Allentown, Pa., died after running wildly along Atlantic Avenue in Crown Heights with no pants or shoes on while trying to get into cars that were stopped at a traffic light shortly after 6 a.m., authorities said.

An unconscious Wright was discovered several blocks away and taken to Interfaith Hospital, where he died, officials said.

No cause of death has been determined.

An autopsy is scheduled.

Authorities did not say if Wright had any medical conditions, and police found no drug paraphernalia in his SUV.

Wright’s car had a license plate that indicated that its driver was disabled.

Witnesses said the bizarre drama unfolded when the motorist pulled his Ford Expedition behind several cars traveling east on Atlantic Avenue near Buffalo Avenue.

Wright then got out but apparently left his car in the wrong gear because it rolled away and struck a car-service taxi.

“When he hit my car, he jumped out and ran away,” said Gary Jean, 48, the cab driver.

“He was acting crazy. He tried to jump into other cars. A man on a motorcycle told me to call the police, and he went after the guy.”

Jean initially said the man on the motorcycle, later identified as Rodney Glover, a retired police detective, tackled the motorist.

But, after talking with cops, Jean later changed his story, saying Glover never touched the guy.

Police officials said Wright collapsed on his own.

Wright was apparently visiting relatives who live in the area.

Distraught family members went to the accident scene several hours later and tried to claim Wright’s vehicle, but were turned away by police.

The family members had no comment.

One only said softly, “He passed away.”

Traffic along Atlantic Avenue was blocked in the eastbound lane for several hours while investigators tried to put the pieces together.