AUGUSTA, Maine — State senators on Wednesday followed suit with recent votes cast by their colleagues in the House, splitting largely along party lines to reject a measure that would reduce Maine’s capital gains tax and accept a bill that would bar anyone younger than 18 from using commercial tanning beds.

The Senate, controlled by Democrats, voted 21-14 against a bill, LD 65, that would have cut taxes on income from capital gains by more than 50 percent. Sen. Patrick Flood of Winthrop was the only Republican to join all Democrats in opposing the bill. The Senate’s sole independent member, Sen. Richard Woodbury of Yarmouth, also voted with Democrats.

Senators voted 19-16 to enact the youth tanning ban, LD 272, sponsored by Sen. Geoffrey Gratwick, D-Bangor. Two Democrats, Sen. Linda Valentino of Saco and Sen. John Cleveland of Auburn, voted with Republicans against the ban.

Debate on both bills largely echoed recent debates on the measures in the House.

Democrats said the state couldn’t afford to lower its capital gains tax while Republicans said state government should resist the urge to tax more.

“If we do not have the money, we shouldn’t be giving these exemptions,” said Sen. John Patrick, D-Rumford. “You need X amount of revenue in order to run your country, your state, your municipality. Could this do some good? There’s a possibility it could.”

Sen. Andre Cushing, R-Hampden, said the capital gains issue illustrated fundamental differences between Democrats and Republicans.

“When we tax an item that someone has sought to improve their lot in life with, what we say in Augusta is, ‘We have a better understanding of how to use that money than you do,’” he said. “One party sees every day as April 15 and the other party sees every day as the Fourth of July.”

During debate on the tanning bill, Democrats made mention of a decision earlier this week by New Jersey Republican Gov. Chris Christie to sign a similar tanning ban into law. The New Jersey bill will prohibit anyone younger than 17 from using commercial tanning beds.

Republicans, meanwhile, said new state rules that would make tanning off limits to anyone younger than 14 and require parental consent for older teenagers need to take effect first before legislators again change the law. Others said state policymakers should leave decisions up to parents, rather than have the government make decisions for them.

“We will require a photo ID to go tanning, but we won’t require a photo ID to vote,” quipped Sen. James Hamper, R-Oxford.

But there’s a difference, said Sen. Troy Jackson, D-Allagash, the assistant Senate Democratic leader.

“Tanning clearly can kill you. Going to vote doesn’t. Maybe the people you vote for do,” he said. “I don’t think voting rises to the same thing as a child going in and maybe putting themselves at risk of getting cancer.”

Maine’s new state rules on youth tanning will soon make commercial tanning off limits for anyone younger than 14. In addition, the rules will require that parents accompany their 14- and 15-year-olds to the tanning salon and sign consent forms after being given information about the dangers of tanning. Parents will also have to sign consent forms for 16- and 17-year-olds.

If the bill becomes law, Maine would join California and Vermont in making commercial tanning completely off limits for minors. California and Vermont are the other two states. The tanning bill, however, would first have to clear Gov. Paul LePage, who hasn’t publicly taken a position on the bill.