It’s 10 a.m. and the high-speed train leaves Belgrade’s new, glass-and-steel station right on time. Thirty-six minutes later it pulls into Serbia’s northern city of Novi Sad, the first completed section of a 350 kilometer-long (217 mile-long) upgrade going up to Budapest in Hungary.

The route is the kind of European modernity that Serbia has coveted for years. Yet the line — being built by China — also represents something more political: how Beijing is helping transform a corner of Europe when much of the continent now views it as a strategic rival.

The Belgrade-Budapest rail link will unite the capitals of two countries that have tightened their embrace of China and provided it with a backdoor to a continent that’s torn over its dealings with the world’s second-largest economy.