ST. LOUIS  There was the feel of a political world turned upside down on Saturday as Senator John McCain found himself defending North Carolina and Virginia, while Senator Barack Obama was greeted by huge crowds in Missouri, which Republicans had also considered safe just months ago.

Mr. McCain has escalated his attacks in recent days, all but accusing Mr. Obama on Saturday of being a socialist and saying his rival’s tax plan would turn the Internal Revenue Service into “a giant welfare agency.” Mr. McCain, Republican of Arizona, attached the politically charged word “welfare” to Mr. Obama for the second successive day.

For his part, Mr. Obama depicted Mr. McCain, who favors extending tax cuts for wealthier Americans, as removed from the reality of the hard times descending on the nation.

Mr. Obama, Democrat of Illinois, gave a striking sign of his electoral muscle when he arrived here and journeyed to the Gateway Arch on the Mississippi River. He saw 100,000 people spread out before him, a vast turnout in a state that teeters between the Republicans and Democrats.