He lost this one by a whisker.

A beloved cat living in a Texas public library for nearly six years has to find a new home after the City Council ordered his eviction in a 2-to-1 vote the mayor attributed to City Hall pettiness.

Now “Browser” has 30 days to vacate the public library in White Settlement, despite children’s petitions and voters’ protests, the Fort Worth Star-Telegram reports.

White Settlement Mayor Ron White told the paper that he blames the gray cat’s eviction on pettiness at City Hall because a city employee wasn’t allowed to bring a puppy to work.

“We’ve had that cat five years, and there’s never been a question,” White said.

Lawmakers took up the cat’s fate at a June 14 City Council meeting under an agenda item listed only as “consider relocation of Library Facility cat Browser.”

“City Hall and City businesses are no place for animals,” Council member Elzie Clements said at the meeting, according to a weekly in White Settlement called the Grizzly Detail.

The paper said Clements and another lawmaker voted in favor of evicting Browser. Before the vote, eight people from the audience spoke in support of keeping the cat in the library.

Browser became the library’s mascot after being adopted from an animal shelter.

The library's web page says the cat’s favorite activities include lounging on top of computer keyboards as library patrons try to type on them and attending GED classes.

“This cat has been loved by people of all ages for six years,” Lillian Blackburn, president of the Friends of the White Settlement Public Library, told the Star-Telegram. “I don’t have any animals but this cat is so gentle and so lovable and he brings so much comfort to so many people, it seems a shame to take him away.”

White is hoping the council will reconsider its action at a July 12 meeting, two days before Brower’s eviction date, according to the paper.