SAN FRANCISCO — For over a year and a half, Yahoo has been tormented by a prominent activist investor who has criticized virtually everything about the company, from its business strategy to its efforts to sell major assets.

Now that hedge fund, Starboard Value, is finally getting a seat at the embattled Internet company’s table, heading off a potentially distracting fight and perhaps easing the way for a potential sale of its core business.

Yahoo said on Wednesday that it had given four director seats to Starboard, ending the activist investor’s campaign to unseat the company’s entire board. One of those seats will go to Starboard’s chief executive, Jeffrey C. Smith, who will also join a special board committee overseeing the company’s sale process.

“We look forward to getting started right away and working closely with management and our fellow board members with the common goal of maximizing value for all shareholders,” Mr. Smith said in a statement.