A squatter who took over a historic Presidio Heights mansion in San Francisco last year pleaded guilty to grand theft after he tried selling the valuable paintings he found inside the home, officials said Tuesday.

Jeremiah Kaylor, 39, pleaded guilty Tuesday to two felony counts of grand theft and identity theft, said Max Szabo, a spokesman for the San Francisco district attorney's office. The terms of his plea include one year in county jail and five years probation.

Kaylor will pay $8,858.17 in restitution as a part of a plea deal. He also agreed to stay away from witnesses and properties involved in the case, Szabo said.

In an October jailhouse interview with The Chronicle, Kaylor admitted selling the paintings while staying at the historic Le Petit Trianon, which he called his “thug mansion.” He claimed to be obsessed with pop star Taylor Swift, who was rumored to have been interested in purchasing the three-story Versailles-inspired structure in 2014.

San Francisco police arrested Kaylor in October 2015 after a neighbor and a real estate agent for the property spotted him in the guesthouse garage and called the police. The home, a 111-year-old Koshland House at 3800 Washington Street, was being offered in a bankruptcy sale for more than $17 million.

Kaylor initially handed over fake legal documents and told police he was in the process of buying the home, said Officer Carlos Manfredi, a police spokesman.

Authorities learned 11 paintings valued at $224,000 were missing from the home, pawned to various people and businesses starting in August 2015, according to court documents.

Police tracked down two paintings at a pawn shop in Beverly Hills and found the rest in San Francisco. Kaylor tricked an art gallery owner into buying stolen paintings by impersonating another person.

He bought a domain in the victim’s name and created a fake email from the victim to Kaylor that said the paintings were donated to Kaylor to convince the buyer the sale was legitimate, according to court documents.

Kaylor will be sentenced March 29.

San Francisco Chronicle staff writer Kale Williams contributed to this report.

Jenna Lyons is a San Francisco Chronicle staff writer. Email: jlyons@sfchronicle.com Twitter: @JennaJourno