PROVIDENCE, R.I. — They say birds of a feather flock together, but not at Rhode Island campgrounds.

Tom Wharton didn’t think twice about bringing his beloved cockatoo, Tootsie, with him on camping trips, until the duo were kicked out of two campsites following complaints about his feathered companion.

Rhode Island lawmakers are considering changing the law that allows only four-legged friends likes dogs and cats to accompany their owners to campgrounds.

Rep. Joseph Trillo, the bill sponsor, said he doesn’t think certain pets should be prohibited. Hamsters and goldfish should be allowed to camp, too, the Warwick Republican added.

“That’s why we have to do it pet by pet,” Trillo said. “It’s really nonsense legislation we shouldn’t have to be doing to correct commonsense decisions.”

House lawmakers on Thursday passed the bill, allowing up to two birds in the parrot family per campsite, so long as the birds stay inside a recreational vehicle or camper. Trillo said he introduced the bill after Wharton contacted him.

“My poor cockatoo has to stay home alone in her cage and it’s just not right,” Wharton said.

Wharton, a regular camper, has brought his 21-year-old parrot with him on several camping trips over the years, he said. Tootsie occasionally would leave his 31-foot Airstream, he said, but she doesn’t make any noise.

The 69-year-old Warwick resident said he stopped bringing Tootsie along a few years ago, after the proprietors at two campgrounds asked them to leave. Wharton said he hadn’t realized that having a pet bird at a campground was against state law.

“I feel bad she has to stay home. She loves to ride in the car. I take her to music festivals,” Wharton said.

Trillo’s bill drew the support of lawmakers on both sides of the political spectrum. Warwick Democrat Joseph Shekarchi said he co-sponsored the bill in part because he’s a big animal lover.

The state Department of Environmental Management opposed the original bill, saying it could allow for chickens and turkeys in campgrounds. A department spokeswoman said the agency remains neutral about the amended bill.

Trillo said a companion bill will be introduced in the Senate.