He may have written “Rainy Day Woman,” but to one New Jersey cop, Bob Dylan was little more than a crazed bag lady standing in the rain.

The bizarro rock legend got tangled up in blue in Long Branch, NJ, on July 23 when a homeowner called to report a weirdo hanging around her house.

When the “Like a Rolling Stone” crooner, who was looking for shelter from the storm, told cop Kristie Buble who he was, she thought he was pulling her leg.

“I’ve seen pictures of Bob Dylan from a long time ago and he didn’t look like Bob Dylan to me at all,” the 24-year-old Buble told ABC News.

“He was wearing black sweatpants tucked into black rain boots, and two raincoats with the hood pulled down over his head.”

Buble asked what the 68-year-old rock legend was doing in town.

When Dylan said he was doing a show with John Mellancamp and Willie Nelson, she figured he might be a joker or a thief.

“We see a lot of people on our beat, and I wasn’t sure if he came from one of our hospitals or something,” Buble said.

Even though a second officer joined Buble, he also did not recognize the singer, who was not carrying ID.

The officers then put Dylan in their patrol car and drove him back to the Ocean Place Resort and Spa, where he said he was staying.

“He was really nice, though, and he said he understood why I had to verify his identity and why I couldn’t let him go,” Buble said.

“I pulled into the parking lot,” she said, “and sure enough, there were these enormous tour buses, and I thought, ‘Whoa.’

“We go over to the tour bus and knock on the door and some guy answers and I say, ‘Are you missing someone?’ ” Buble said.

Eventually, tour staffers showed Dylan’s passport and a red-faced Buble thanked him for his cooperation.

“Um, have a nice day,” she said.

Long Branch business administrator Howard Woolley said that given the officer’s youth, it was understandable why she may not have known the counter-culture figure.

“I don’t think she was familiar with his entire body of work,” Woolley said.

lukas.alpert@nypost.com