Pfizer is nearing a deal to buy Allergan, a rival drug maker that has its headquarters in Ireland, for as much as $150 billion, potentially helping the company move its corporate citizenship abroad and reduce its tax bill, a person briefed on the matter said on Wednesday.

The two companies are discussing a potential deal valued at $370 to $380 a share, said the person, who was not authorized to speak publicly about the negotiations. That would make a transaction the biggest announced so far in 2015, in what has proved to be a banner year for deal-making across industries.

At the high end of the range, such an offer would represent a premium of more than 22 percent over Allergan’s closing stock price on Wednesday.

Yet several details remain unresolved. Among them is whether the timing and structure of a takeover would be affected by new guidelines from the Treasury Department governing so-called corporate inversions, mergers in which the acquirer moves its headquarters to lower-tax jurisdictions abroad.