Chinese President Xi Jinping intends to visit India as early as February, Nikkei has learned, in a move seen at countering Washington’s increasingly antagonistic trade policy and aggressive Indo-Pacific diplomacy.

Xi is expected to discuss with Indian Prime Minister Narendra Modi measures to defuse border tensions, as well as propose deals to expand imports of Indian farm products and increase cooperation in advanced technologies, according to sources.

The sources say Xi hopes to visit ahead of India’s general elections due by May. An Indian source said the visit would be in February at the earliest, but a Chinese source said it will be after China’s National People’s Congress in March.

The visit, whenever it occurs, offers Modi a golden opportunity to show voters a diplomatic victory ahead of an election in which he likely faces an uphill fight.

When Modi took office in 2014, he broke with the Indian tradition of treating all sides equally. The prime minister chose to draw closer to the U.S., Europe and Japan, while distancing India somewhat from China.

Tensions between China and India flared in summer 2017, with troops facing off across the border for three months. Modi’s leadership during that period impressed Indian voters. A source from the ruling coalition described Modi as a strong leader who “did not give up an inch” to the People’s Liberation Army.

Since spring of last year, Modi has pivoted to a more China-friendly trajectory during the run-up to the elections. Modi is making it a point to touch upon foreign policy during his campaign speeches. By adopting that strategy, the voters will see Modi as a prime minister other world leaders cannot ignore — a figure who is putting India on the global map, said Sanjay Kumar, director of the Centre for the Study of Developing Societies.

The meeting also could result in more Chinese imports of Indian agricultural products, including soybeans.

Bolstering ties with New Delhi could provide China an alternative supplier to the U.S. for advanced technologies, given India’s highly developed information technology sector. Worried that worsening relations with Washington might restrict the supply of critical components, Beijing has sought to expand connections in this field with its South Asian neighbor.

Last year, China set up an IT corridor in the southwestern city of Guiyang to encourage Indian tech companies to set up shop in the country. Guiyang’s year-round cool temperatures, thanks to high altitudes, have made it a hub for big data projects.

Xi’s visit will also help China counter U.S. President Donald Trump’s Indo-Pacific strategy of deepening cooperation with Japan, India, Australia and other regional players to curb China’s influence. But Chinese military sources say the Trump administration has yet to finalize its strategy, giving Xi an opening to dissuade Modi from joining the U.S.-led anti-China coalition.

Still, it is unclear whether China-India relations will pan out as Xi hopes. The territorial dispute remains a sticking point, and there are reports that India is planning a massive road construction project along the border. New Delhi is also wary of Beijing’s Belt and Road Initiative, having not sent senior officials to the first international forum about the initiative hosted by China in 2017.

Should India refuse to take part in the second forum scheduled for April this year, the rift between the two countries could widen.

China’s strategy for India resembles the way it improved ties with Japan. When Xi met Japanese Prime Minister Shinzo Abe in the Russian city of Vladivostok last September, the Chinese president said he was looking forward to Abe’s visit to China the next month.

The two met again in October in Beijing, one week before the leadership election of Japan’s ruling Liberal Democratic Party, a contest that Abe eventually won.