United States stocks overcame early losses to close higher in a holiday-shortened session as investors were buoyed by upbeat US economic data that overshadowed political and financial markets' turmoil in Portugal.
The Dow Jones industrial average rose 56.14 points, or 0.38%, to close at 14,988.55 points.
The S&P 500 index closed up 1.33 points, or 0.08%, to 1,615.41 points.
The Nasdaq Composite was up 10.27 points, or 0.30%, to close at 3,443.67 points.
Portugal's PSI 20 index fell 5.31%, amid a broader sell-off of European stocks and bonds as Portugal's government teetered on the brink of collapse, sparking concern for the outlook of austerity measures.
ADP payrolls firm estimated that 188,000 private-sector jobs were generated in the US in June, well above the May reading of 134,000.
The weekly Labor Department report on jobless claims was also a positive, as claims fell 5,000 below the previous week's level to 343,000.
Investors are keenly awaiting monthly US employment figures due to be released during Friday's session on Wall Street.
Data showed that US home prices in May rose 12.2%, their largest monthly gain in seven years.
Separately, data showed that the US trade deficit grew in May, due largely to a surge in imports.
US markets closed early, at 1pm EDT, or 0300 AEDT Thursday morning, ahead of Thursday's US Independence Day holiday, when US markets will be closed.
Investors were edgy over the political crisis in Egypt, where President Mohamed Morsi has refused to quit in the face of mass protests demanding his resignation.
The market "has chosen to focus more on the economy, sort of voting that jobs matter more than Egypt for US corporate health," said Alec Young, global equity strategist at S&P Capital IQ.
Analysts cautioned that Wednesday's movements were intensified by light trading volume.
The other uncertainty surrounds China, where a reading on non-manufacturing PMI fell to 53.9 in June compared with 54.3 in May, another sign of the country's economic slowdown.
Boeing rose 1.4% after reporting it had received 692 net orders for commercial planes since the start of the year, slightly less than European rival Airbus's 722 orders.
Independent oil and gas producer Apache, the major oil producer in crisis-wracked Egypt, fell 2.3%. Egyptian production accounts for 24% of the firm's revenues, according to a report from Clarkson Capital Markets.
Mead Johnson, which provides baby formula and other nutritional products, sank 8.1% after the Chinese government launched a probe into alleged price fixing by some foreign producers of baby formula. Abbott Laboratories, another baby formula producer, fell 1.8%.
Linn Energy fell for a second day, this time by 15.8%, after disclosing that it was facing an inquiry into the company's proposed acquisition of Berry Petroleum.
Bond prices fell. The yield on the 10-year US Treasury was 2.50%, up from 2.47% Tuesday, while the 30-year rose to 3.50% from 3.47%. Bond prices move inversely to yields.