Juul is considering selling the San Francisco office tower it bought just five months ago for nearly $400 million.

The San Francisco vaping company purchased the 28-story office building at 123 Mission St. — which is five times larger than its current corporate headquarters at Pier 70 near Dogpatch — with the intent to move in employees next year.

Juul paid around $1,093 per square foot, among the highest rates ever paid for a San Francisco office building.

At the time, the company had about 1,200 employees in the city and was expanding quickly. But its fortunes changed quickly over the summer when a series of events damaging to the company and the vaping industry unfolded in rapid succession — culminating in Juul announcing last week that it will cut spending by $1 billion and lay off 650 workers, roughly 16% of its global workforce.

The company just laid off 245 Bay Area employees — mostly in San Francisco, and some in Mountain View and South San Francisco, according to notices the company sent state and city officials last week.

Juul has engaged a broker to explore the sale of the office building. The move is “part of the leadership team’s ongoing review to align the company’s organization and financial resources behind key priorities,” a company spokesman told The Chronicle.

The company will continue leasing its headquarters at Pier 70. The space is on city-owned land, and officials had been exploring ways to kick the company out amid a surge of ill will toward a vaping firm that some people felt was to blame for addicting teens to nicotine.

“We remain committed to our presence in San Francisco, which is where Juul Labs was founded and where many of our talented employees live,” Juul spokesman Ted Kwong said in a statement.

Juul’s decision to buy the building was unusual. Most companies prefer to rent office space because it gives them more flexibility to add space as they grow rather than locking in real estate based on growth projections that may not turn out to be accurate. But some landlords were reluctant to lease office space to Juul because of its regulatory risks, according to a person with direct knowledge of the matter. That resistance might explain, in part, why owning its own building appealed to the vaping company.

It might yet turn out to be a smart bet. The tower, built in 1986, is in the growing Transbay neighborhood and blocks from offices leased by Salesforce, Facebook and Google. That makes it desirable, and Juul will probably make a profit if it sells, said Daniel Cressman, executive managing director at brokerage Newmark Knight Frank, who isn’t involved in the building sale.

“San Francisco is by far the most liquid market for high-rises in the world,” Cressman said. “There’s strong, strong investor demand.”

Cressman said as some office rents exceed $90 per square foot annually, among the highest in the country, property values continue to rise.

The previous owner of 123 Mission did well. Northwood Investors of New York, which bought it from Chinese company HNA Group for $290 million in 2018, sold it to Juul for $397 million just a year later.

Other companies have sold their buildings for a vast profit, but after owning them longer than five months. Zynga sold its headquarters building at 650 Townsend St. for $600 million this year after paying $228 million in 2012.

Supervisor Shamann Walton, whose district includes Juul’s headquarters at the port, said he is pleased the company is looking at selling the downtown building and hopes it will also consider ending its lease at Pier 70 and moving out of the city.

“I would just hope that because they’re talking about selling that building, that maybe they are also focused on not conducting business in a city that doesn’t want them,” said Walton, a frequent Juul critic who co-sponsored legislation banning the sale of e-cigarettes that passed in June. “We do not need a company like that in San Francisco.”

The sale would be good for San Francisco in another sense. It would bring in more revenue, after Juul paid $11.91 million in city transfer taxes on the purchase, according to property records.

While Juul had already been facing growing regulatory pressure over its role in the rise in youth vaping, its troubles were compounded recently when cases of vaping-related lung illnesses and deaths — which have hit nearly 2,300 illnesses and 47 deaths — began emerging in dozens of states.

It prompted the White House to say in September it would soon issue a federal ban on flavored e-cigarettes; that policy seems to have been stalled. Within days, Juul CEO Kevin Burns stepped down and was replaced by longtime tobacco executive K.C. Crosthwaite. Then, this month, the company decided to stop selling its most popular product, the mint-flavored Juul pod, in the United States. Mint pods account for an estimated 60% of Juul’s U.S. retail sales. Because Juul had already stopped selling its other flavored products — mango, cucumber, creme and fruit — amid pressure from regulators and health advocates, the move left the company selling just menthol and tobacco-flavored nicotine pods in the U.S.

Juul has also committed $100 million to install digital cash registers with age verification technology at U.S. stores to block sales to underage customers. The company emphasizes that its products are for adult smokers who want an alternative to cigarettes and that it does not seek underage customers.

In its hometown of San Francisco, Juul also sustained a loss when Proposition C, a ballot measure it had been promoting that would have repealed the city’s sales ban on e-cigarettes, was voted down by a wide margin on Nov. 5. The company had stopped supporting it shortly after Crosthwaite became CEO.

On Monday, California Attorney General Xavier Becerra filed a lawsuit accusing Juul of illegally advertising to young people and failing to warn consumers about the potential health risks of using its products. The suit also says Juul failed to verify the age of California consumers and violated the privacy rights of minors by keeping the email addresses of underage buyers who failed age verification on Juul’s website, and using those addresses to send them marketing materials.

Catherine Ho and Roland Li are San Francisco Chronicle staff writers. Email: cho@sfchronicle.com roland.li@sfchronicle.com Twitter: @Cat_Ho, @rolandlisf