Stocks kicked off the first trading day of the month and quarter with modest gains, recovering from a recent string of declines, lifted by an upbeat manufacturing activity report and as investors seemed to shrug off the first partial government shutdown since 1996.
(Read more: After-hours buzz: Global Payments, Allstate & more)
"The market's going to be sanguine about this because [politicians have] found a way to solve this in the past," said Tim Hopper, chief economist at TIAA-CREF. "We're approaching this as an event that creates volatility, not a trend that changes market direction. And on the economic realm, this is going to have a small-scale impact to growth."
The Dow Jones Industrial Average gained 62.03 points, to end at 15,191.70, lifted by Merck.
The rose 13.45 points to close at 1,695. And the Nasdaq rallied 46.50 points to finish at 3,817.98.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, slid below 16.
All key S&P sectors finished higher, lifted by health care and techs.
The White House ordered federal departments to execute shutdown plans, leaving nearly 800,000 people out of work, after Democrats and Republicans failed to agree on a spending bill before Monday's midnight deadline. The Senate twice rejected the House of Representatives' demands to delay portions of the Obamacare health insurance bill. Now, the two parties must strike a deal on raising the federal borrowing limit to avoid a debt default by October 17.
This is the first partial federal shutdown since 1996, and it is uncertain for how long it might last.
(Read more: 'Obamacare' exchanges start up as govt shuts down)
President Barack Obama criticized the House of Representatives Tea Party members for shutting down the government over an "ideological crusade" on health- care reform, adding that the longer the shutdown continues, the worse the impact will be.
"History tells us it is not necessarily a bad thing for investors," according to Jeff Kleintop, chief market strategist at LPL Financial. "The 16 government shutdowns over the past 40 years that have ranged from 1 to 21 days have not been particularly negative for stock market investors, averaging only a 2 percent decline for the S&P 500."
"More importantly, from a longer-term perspective they preceded above average returns," he continued. "The S&P 500 Index has risen 11 percent on average in the 12 months following the shutdowns, above the 9 percent for all periods. Notably, in the last government shutdown that took place 17 years ago in late 1995, the S&P 500 rose 21 percent in the following year."
On the economic front, the manufacturing sector expanded at its fastest pace in almost 2-1/2 years in September, according to the Institute for Supply Management (ISM).
Meanwhile, construction spending for August, which had been scheduled for 10 am ET was canceled due to the government shutdown. And the Labor Department's Bureau of Labor Statistics said the nonfarm payrolls report will not be released on Friday.
The Labor Department will still publish its weekly jobless claims reports as usual on Thursday.
Daiwa Capital Markets' Grant Lewis said the negative impact on growth would be directly proportional to the length of the shutdown.
"With the deadline to extend the debt ceiling (17 October) also rapidly approaching, the longer there is no agreement on getting the government back up and running, the greater concerns will be over getting agreement on the debt ceiling, further fueling economic uncertainty," he wrote in a note.
"We decided to continue dialogue in about three weeks," Icahn continued in his Tweet.
Ford Motor climbed after the automaker posted a 6-percent increase in its September sales. Meanwhile, rival General Motors edged lower after the car maker's sales declined 11 percent in the same period.
Among earnings, Walgreen rallied after the drugstore chain posted earnings that edged past expectations and announced a 4.6-percent increase in same-store sales.
Merck climbed to top the Dow gainers after the pharmaceutical giant announced plans to slash an additional 8,500 jobs on top of previously announced cuts, adding that it planned to cut operating expenses by $2.5 billion by the end of 2015.
Citigroup gained after Credit Suisse raised its target price on the financial giant to $65 from $60.
Yelp rallied after Cowen and Company lifted its target price on the consumer review website to $80 from $60.
Stocks in Asia and Europe mostly moved higher in early trade on Tuesday, with Italian stocks paring losses from the previous session's heavy selling. The country's benchmark FTSE MIB recovered somewhat on reports that Silvio Berlusconi's center-right party could rebel if he continues to threaten to bring down the government.
(Read more: Italian companies implode amid government turmoil)
Meanwhile, Japan's benchmark index pared gains, following an earlier 1 percent spike after Prime Minister Shinzo Abe decided to raise the national sales tax to 8 percent from 5 percent. Investors now expect a hefty stimulus package worth $50 billion to help mitigate the tax hike impact.
—By CNBC's JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)
On Tap This Week:
WEDNESDAY: Mortgage applications, ADP employment report, Bernanke speaks, Dell event; Earnings from Monsanto
THURSDAY: Challenger job-cut report, jobless claims, factory orders, ISM non-mfg index, natural gas inventories, Fed's Fisher speaks, Fed Gov Powell speaks, Fed balance sheet/money supply; Earnings from Constellation Brands
FRIDAY: Nonfarm payrolls, Fed's Kocherlakota speaks
What's Trending on CNBC.com: