British drugmaker GlaxoSmithKline has agreed to pay $3.6 billion for Rockville-based Human Genome Sciences after a months-long buyout dispute, marking the largest sticker price for a local biotechnology acquisition in five years.

The deal brings an end to what had become an increasingly heated battle for control of the life sciences company, one of the region’s highest-profile biotechnology firms.

Glaxo has extended multiple buyout offers since April that valued HGS at $2.6 billion, or $13 per share, but the company’s board of directors repeatedly rejected them as too low .

The latest agreement would fetch $14.25 per share in cash for HGS, a transaction value worth about $3.6 billion, or approximately $3 billion after subtracting HGS’s cash and debt, the companies said.

The Maryland biotechnology industry has seen a number of big-ticket buyouts in recent years, though none as large as the $15.6 billion that Gaithersburg-based MedImmune garnered in 2007. More recently, Micromet and Martek Biosciences each sold for roughly $1.1 billion.

HGS was founded by William Haseltine in 1992 with millions of dollars in backing from venture capitalists looking to take advantage of the latest discoveries in genome science. The company successfully developed the first new treatment for lupus in 50 years, but the therapeutic and commercial success of its research has taken longer to materialize than many had hoped.

A person familiar with the negotiations, who spoke on the condition of anonymity because public comment has not been authorized, said HGS officials contacted Glaxo on Friday to negotiate the sale. The talks continued through the weekend and resulted in the deal announced Monday, the deadline HGS had set to receive alternative bids.

Both firms declined to comment.

“I’m sure some HGSI members or management would like a higher price and they tried to find that,” said Liisa Bayko, managing director at JMP Securities. “It doesn’t look like there were other bidders at current [price] levels because the price they negotiated to is not that far off from where they started.”

Glaxo had attempted to bypass the board and buy stock directly from investors in May. HGS then thwarted that effort by moving forward with plans for a “poison pill” that would make acquiring its stock near impossible. Some disgruntled shareholders filed a lawsuit in response.

“We’ve seen a number of hostile bids in this space but going through what’s kind of an extraordinary step of a poison pill approach, instead of taking it to shareholders and arguing it out there, was kind of unprecedented,” said Christopher Raymond, senior biotechnology analyst at Robert Baird.

The buyout battle was all the more notable because HGS and Glaxo are development and marketing partners on several drugs including Benlysta, which was approved by the Food and Drug Administration in March to treat systemic lupus. The firms have two other drugs under development: darapladib for cardiovascular disease and albiglutide for diabetes.

Glaxo has said it expects to save as much as $200 million by 2015 as a result of “cost synergies” between the two companies, though it’s unclear whether some of that savings would include layoffs at HGS’s Maryland facilities.

Some analysts predicted a higher sales price because HGS stock nearly hit the $30 mark last year. The $14.25 per share price represents a 99 percent premium over the closing stock price of $7.17 on April 18, before the initial buyout was proposed.

“If you own this [stock] year to date, you should be pretty happy,” Raymond said. “But it’s been a lot higher than here, so is it a ding on HGS? In some ways I think you can argue they’ve definitely not fulfilled the promise of this name’s history going back.”

After the approval of Benlysta, the company’s fortunes appeared to have shifted and it seemed ready to carry a drug the distance from discovery to market without being snapped up by a pharmaceutical giant.

“HGS was viewed as being the first biotech company that took their own drug and became a pharmaceutical company,” said Stephen Fuller, director of the Center for Regional Analysis at George Mason University. “They grew up on their own. Then it didn’t happen.”