HONG KONG/JAKARTA - Indonesian financial markets surged after opening on Thursday, buoyed by news that incumbent leader Joko Widodo was on course to get a second five-year term, though gains were pared in the afternoon as some investors took profits.

Early in the day, Jakarta shares were up as much as 2.4 percent to their highest level since February 2018. At the close, the benchmark index had gained 0.4 percent, to 6,507.22, its best close since March 22.

In Jakarta, the rupiah ended the day 0.3 percent stronger at 14,040 to the dollar, its firmest closing in seven weeks. At one point, it was up 0.6 percent.

Benchmark 10-year government bond yields finished the day at 7.582 percent, after earlier easing to 7.573 percent, the lowest in 10 days.

Thursday morning's gains reflected how many market players have been hoping that Widodo would defeat opponent Prabowo Subianto, seen as a champion of economic nationalism, in Wednesday's election.

Officials results will not be released until May, but a unofficial quick-counts by reputable polling firms - which is past elections have been accurate - showed the incumbent, known as Jokowi, with a lead of around 10 percentage points.

In the afternoon, some investors switched their focus from relief about Widodo's apparent victory to the challenges his administration will face in the new term.

CABINET CHANGES AHEAD

"The key thing for us to watch is the cabinet choices, especially if Sri Mulyani Indrawati (who is well respected in markets) stays as the country's finance minister," Akash Tillu, Fidelity's sovereign analyst, Asian fixed income, said in a note on Thursday.

Harry Su, head of equity markets at investment firm Samuel International, cautioned that the Jakarta exchange's valuations are currently relatively expensive compared to others in the region, "particularly given slowing corporate earnings growth due to weaker global economies."

He maintained his target for the Jakarta Composite Index (JCI) at 6,800, saying that should the market get close to that, "investors should use that as an exit mechanism".

Joanne Goh, a DBS equity strategist in Singapore, raised the bank's benchmark JCI target to 6,900 points from 6,500.

"The JCI has been re-rated during Jokowi’s term and further improvement is possible in our view," she said in a memo.

A trader in Jakarta said profit-taking in stocks Thursday afternoon was mostly driven by domestic retail investors.

A government official close to widodo told Reuters that victory could supur him "to continued and maybe even accelerate economic reforms.

Indonesia's economic growth has hovered around 5 percent in the last few years, well below the 7 percent Jokowi initially targeted in his first term.

Analysts at Goldman Sachs, in a note on Thursday, said they expect Widodo to deliver "policy continuation and renewed efforts on infrastructure development, which had been delayed last year on concerns over current account deficit".

Some analysts also said they expect a strengthened rupiah could give Indonesia's central bank room for a rate cut after it raised the policy rate IDCBIR=ECI by 175 basis points last year.

"Real yields are too high and the central bank will have room to cut rates. But equities will really depend on (fiscal) policy, on whether there will be a catalyst for earnings," said Anthony Chan, chief Asia investment strategist at Union Bancaire Privée in Hong Kong.

($1 = 14,080 rupiah)

(Reporting by Noah Sin in Hong Kong and Fransiska Nangoy in Jakarta; Editing by Kim Coghill) ((Fransiska.Nangoy@thomsonreuters.com; +62 21 2992 7610; Reuters Messaging: fransiska.nangoy.thomsonreuters.com@reuters.net))