WASHINGTON — Under friendly fire in the Capitol and squeezed politically at home, Senator Max Baucus of Montana, the powerful chairman of the Senate Finance Committee and a man often at odds with fellow Democrats, announced Tuesday that he would retire in 2014 after four decades in Congress.

The decision by Mr. Baucus, 71, to forgo a seventh term brings to six the number of Senate Democrats who will not seek re-election next year, including many of the party’s most popular and venerable senators. Mr. Baucus, though, was known for frustrating Democratic leaders by opposing major party initiatives as well as his solo attempts to cut deals with Republicans. Leadership efforts to go around Mr. Baucus may have contributed to his determination that it was time to exit the Senate, although he firmly denied that in an interview.

His votes last week against gun control legislation pushed by President Obama earned him the enmity of many liberals, including an advertising campaign attacking him in his home state. And his break on guns came after he opposed the Democratic leadership’s budget plan, which contained targets for tax increases that he had fought against as chairman of the tax-writing committee.

Just this week, over Mr. Baucus’s fierce opposition, Democratic leaders forced Internet sales tax legislation to the Senate floor — without his committee’s imprimatur. Montana is one of five states without a sales tax — along with Alaska, Delaware, New Hampshire and Oregon — and Mr. Baucus has tried to rally resistance to the Internet bill, which is championed by Senator Richard J. Durbin of Illinois, the Senate’s No. 2 Democrat.