US stocks closed higher in shortened pre-July 4th holiday trade helped by fresh jobs data while turmoil in Egypt and Portugal had no significant impact on the markets.
The Dow Jones Industrial Average rose 56.14 (0.38 percent) to 14,988.55.
The broad-based S&P 500 edged up 1.33 (0.08 percent) to 1,615.41, while the tech-rich Nasdaq Composite Index increased 10.27 (0.30 percent) to 3,443.67.
Markets will be closed Thursday for the US Independence Day holiday.
After falling in early trade amid concerns about the political crisis in Egypt and high-level government resignations in debt-laden Portugal, shares pushed into positive territory and held their gains to the close.
The market's positive bent was fueled by a better-than-expected ADP report on private-sector job growth in June. The weekly Labor Department report on jobless claims showed a small drop in claims.
On the downside, business activity in the massive US services sector in June fell to 52.2 from 53.7 in May on the Institute for Supply Management's purchasing managers index. Analysts had expected a reading of 54.0.
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.
Boeing rose 1.4 percent 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 percent. Egyptian production accounts for 24 percent 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 percent 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 percent.
Linn Energy fell for a second day, this time by 15.8 percent, 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 percent, up from 2.47 percent Tuesday, while the 30-year rose to 3.50 percent from 3.47 percent. Bond prices move inversely to yields