BENGALURU, Feb 18 (Reuters) - Indian shares ended down in choppy trading on Friday as energy and pharma stocks fell amid geopolitical tensions over Ukraine and uncertainty over U.S. Federal Reserve's rate hike plans.

The NSE Nifty 50 index fell 0.16% to 17,276.30, while the S&P BSE Sensex dipped 0.1% to 57,832.97. Both the indexes recorded their second weekly decline, falling close to half a percent.

While increasing expectations for U.S. Federal Reserve rate hike action have been plaguing the markets, the recent geopolitical standoff between Russia and Ukraine has further accentuated the uncertainty and led to a risk-off environment, said Milind Muchhala, executive director, Julius Baer, India.

"This elevated volatility can continue for a couple of months more, until the time we get some more clarity on the inflation trajectory and the Fed action."

Analysts said persistent selling from foreign institutional investors (FII) has weighed down the market sentiment. FIIs have sold a net $6.41 billion in Indian equities so far this year, Refinitiv data showed, compared with net purchases of $5.82 billion in the same period last year

Shares of Ambuja Cements slumped nearly 6% after a steep escalation in fuel prices cut its quarterly profit by half.

The Nifty energy index fell 0.9% after gaining more than 3% in the past few sessions, while the pharma index dropped 0.87%.

Oil & Natural Gas Corp and Cipla were the top drags on the Nifty, falling 2.2% and 2.1% respectively.

Meanwhile, global stocks rose in cautious trading as investors pinned their hopes on high-level diplomacy next week aimed at avoiding a Russian invasion of Ukraine. (Reporting by Nallur Sethuraman in Bengaluru; Editing by Vinay Dwivedi)