Dec 19 (Reuters) - U.S. stocks reduced their gains on Monday after several people were killed by a truck driven into a Christmas market in Germany.

All three major U.S. indexes were in positive territory but off of earlier highs after German police said a truck ran into a crowded Christmas market in Berlin, killing nine people and injuring up to 50 others.

That rattled U.S. investors already looking to potential global troubles after the Russian ambassador to Turkey was shot dead in Ankara.

“Markets want to be sure whether this is an isolated incident. Will this disrupt economic activity in just this area or will it be a wider area and for how long?,” said John Canally, chief economic strategist for LPL Financial. “That’s the playbook by which markets have come to address these types of issues.”

At 3:33 pm (2033 GMT), the Dow Jones industrial average was up 0.16 percent to 19,876.1 points and the S&P 500 had gained 0.12 percent to 2,260.77.

The Nasdaq Composite added 0.26 percent to 5,451.27.

The Dow Jones industrial average is less than 1 percent away from 20,000, a level it has never breached.

Microsoft rose 1.86 percent, Amazon.com gained 0.98 percent and Apple climbed 0.42 percent. All three provided the biggest boost to the Nasdaq and the S&P 500.

United Technologies rose 2.12 percent, helping lift the Dow, after Credit Suisse upgraded the stock to “outperform” and increased its price target.

Walt Disney rose 1.34 percent after its “Rogue One: A Star Wars Story” movie scored the second-largest December opening in history.

Advancing issues outnumbered declining ones on the NYSE by a 1.48-to-1 ratio; on Nasdaq, a 1.30-to-1 ratio favored advancers.

The S&P 500 posted 12 new 52-week highs and no new lows; the Nasdaq Composite recorded 142 new highs and 35 new lows. (Additional reporting by Tanya Agrawal in Bengaluru and Rodrigo Campos in New York; Editing by James Dalgleish)