WASHINGTON — Something strange has been happening to taxes in Republican-dominated states: They are going up.

Conservative lawmakers in Kansas, South Carolina and Tennessee have agreed to significant tax increases in recent weeks to meet demands for more revenue. They are challenging what has become an almost dogmatic belief for their party, and sharply diverging from President Trump as he pushes for what his administration has billed as the largest tax cut in at least a generation.

And now some Republicans say that what has played out in these states should serve as a cautionary tale in Washington, where their party’s leaders are confronting a set of circumstances that looks strikingly similar.

Republicans, with control of Congress and the White House and a base that is growing impatient for tax reform, are trying to solve a difficult math problem: paying for critical programs like infrastructure, health care and education while honoring their promise to deliver lower taxes without exploding the deficit.