For same-sex married couples in Maryland and elsewhere, filing taxes is about to change.

The IRS announced recently that same-sex marriages will be recognized for federal tax purposes, even if couples live in states that do not permit gay marriage. This ruling, which takes effect Sept. 16, will have a broad impact, affecting estate and income taxes as well as financial protections for spouses in retirement accounts.

"This is a major change," said Harry Atlas, a partner at Venable, a Baltimore law firm.

Federal agencies have been revising regulations since the U.S. Supreme Court ruled in June that the Defense of Marriage Act — which defined marriage as a union between a man and a woman — was unconstitutional. The IRS ruling only applies to same-sex couples married in states that recognize their marriages. It does not cover those in domestic partnerships or civil unions that some states have adopted instead of marriage for same-sex couples.

Maryland began allowing same-sex marriage in January. For couples married under the new law, the IRS rule mostly will affect them going forward.

But for couples here who married years earlier in other states that have same-sex marriage, such as Massachusetts, New Hampshire or New York, the IRS ruling could have an impact on recent tax returns. These taxpayers might want to review old returns and consider amending them.

Here are some consequences for same-sex married couples under the new IRS rule:

Filing status If you're filing a tax return on or after Sept. 16, you must file as "married filing jointly" or "married filing separately."

Couples are usually better off financially filing jointly.

However, some choose to file separately to keep finances apart, even though it means fewer tax breaks. For example, spouses filing separately are not entitled to the earned income tax credit, the American Opportunity education credit or a deduction for student loan interest.

Same-sex couples who married in recent years haven't been able to file jointly. But they will be able to amend recent returns using Form 1040X to reflect their married status if they want. Generally, returns can be amended going back three years; in this case, for tax years 2010, 2011 and 2012.

Marriage bonus, penalty Be aware, filing jointly can be a financial blessing — or a curse.

Some joint filers trigger what's called a "marriage bonus," where a couple pays less tax filing together than if they were single. This bonus typically occurs when one spouse has a much higher income than the other.

But couples could also end up owing more by filing jointly. This "marriage penalty" can happen when each spouse earns a similar high income, throwing them into a higher tax bracket and owing more than if they were filing as singles.

Joint filers can also be phased out of a deduction or a credit because their combined income is too high, said Elizabeth Zanet, a tax analyst with Thomson Reuters in New York.

Before amending an old return, "you want to do the math to make sure that by filing as 'married filing jointly' you really do reduce your taxes," Zanet said.

Also, couples who got an extension to file their 2012 tax return until mid-October should run the numbers to see if they are better off filing as single or joint filers, said Mark Luscombe, principal analyst with CCH, an Illinois provider of tax information.

If it turns out they are hit by the marriage penalty, they should rush to file as singles before Sept. 16, when they will be required to start filing as married, he said.

Medical benefits An employee in an opposite-sex marriage has been able to put a spouse on a workplace health plan without any tax consequences.

This hasn't been the case for same-sex spouses. The value of a spouse's health care benefit had to be reported as income on the employee's tax return.