Baldwin arrives back home after his brush with the law.Photo: Splash News

Alec Baldwin was stopped by two NYPD cops on Tuesday for ­cycling the wrong way down a street, then went on an ­F-bomb-filled rant because they had the nerve not to know who he was, police sources told The Post.

The Bloviator told the two ­female officers to “go f–k themselves” when they pulled him over for pedaling against traffic on Fifth Avenue near 16th Street at about 10:15 a.m., the sources said.

The 13th Precinct cops, on routine patrol, asked Baldwin to show ID, but he didn’t have any.

Baldwin was “totally belligerent” during the tirade, “yelling and screaming” at the cops, who had no idea he was a famous actor, sources said.

“I don’t have ID. Just give me the f–king summonses!” a source quoted Baldwin as saying.

“At one point, the cops thought he would hit them,” another source said.

Alec Baldwin being arrested on May 13.Photo: InTouch Weekly

Baldwin stayed calm as he was handcuffed and taken to the station house for a warrant check, but became enraged again when he spoke to the cops’ supervisor.

Alec BaldwinPhoto: Splash News

“How old are these officers?” he griped. “They don’t even know who I am.”

Baldwin, 56, charged with disorderly conduct and going the wrong way on a one-way street, was released pending a July 24 court appearance.

The disorderly-conduct charge was filed because Baldwin’s fury at the scene resulted in a crowd gathering, a source said.

The violation is punishable by up to 15 days in jail, and about $500 in fines and surcharges.

After his release, Baldwin biked back to his East 10th Street home and jumped on Twitter to rip the cops — and the Big Apple.

“New York City is a mismanaged carnival of stupidity that is desperate for revenue and anxious to criminalize behavior once thought benign,” Baldwin wrote.

He called out the cop who busted him — but got her last name wrong.

“Officer Moreno, badge number 23388, arrested me and handcuffed me for going the wrong way on Fifth Ave,” Baldwin tweeted after getting sprung.

The cop’s name is actually Montero, sources said.

Baldwin later unleashed more venom on Twitter, claiming that Montero “lied in her report.”

“So, when a cop lies to protect themself, what do I plead in court . . . Even if you are innocent, witnesses, what do you do?” he tweeted.

He added, “I simply want people to know I asked for no special treatment,” before tweeting, “Correction: Officer’s name is Montero.”

After his second Twitter outburst of the day, Baldwin’s yogi wife, Hilaria, 29, tweeted: “Shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.”

In a photo of his arrest obtained by InTouch Weekly, Baldwin is shown wearing shorts, a jacket, a visor and two pairs of handcuffs behind his back as an NYPD officer led him to a patrol car on Fifth Avenue.

After getting sprung, Baldwin biked back to his East Village home and immediately took to Twitter to vent his rage.

“New York City is a mismanaged carnival of stupidity that is desperate for revenue and anxious to criminalize behavior once thought benign,” he wrote.

Baldwin also griped that photographers were staking out his East Village apartment and “ONCE AGAIN terrified my daughter and nearly hit her with a camera.”

Officer Moreno, badge number 23388, arrested me and handcuffed me for going the wrong way on Fifth Ave