April-June net profit was 13.91 billion rupees ($227.73 million), compared with a net loss of 12.76 billion rupees a year earlier. The prior-year period included a 25.17 billion rupee provision for settlement of a patent infringement litigation.
Analysts on average had expected a profit of 12.85 billion rupees, according to data compiled by Thomson Reuters.
Net sales rose 12 percent to 39.36 billion rupees, while sales in the United States, from where the company makes more than half its revenue, advanced 7 percent.
Sun Pharma is in the process of gaining regulatory approvals for its $3.2 billion acquisition of loss-making rival Ranbaxy Laboratories Ltd from Japan's Daiichi Sankyo Ltd and expects to close the deal by December.
The company has got approvals for the deal from anti-competition authorities in all applicable markets excluding India and the United States, Sun Pharma said in a statement late on Tuesday. (1 US dollar = 61.0800 Indian rupee)