China's first big jetliner just passed a crucial test that will take the country a step closer to becoming one of the world's elite large airline makers.

The C919 airliner, which is produced by the Commercial Aircraft Corporation of China, or Comac, finished its final ground trial on Sunday in Shanghai.

Test pilots sped the C919 down the runway at Pudong International Airport, lifting the nose of the jet into the air and slamming on the brakes.

Before the airplane could make its maiden flight -- expected before the end of May -- the pilots had to demonstrate the jet can safely stop on the runway in case something goes wrong.

The 168-seat C919 is roughly the same size as Airbus's A320 and Boeing's 737-800, which are the most popular airliners in the world.

From the outside, China's new airliner looks familiar. Its design is a hybrid of western aerospace companies and Chinese industry, and its engines are nearly identical to those on the newest Airbus models.

From the inside, the jet may actually be more comfortable than its western counterparts. Comac has added extra inches to the width of the cabin compared to the Boeing and Airbus designs.

When the jet finally takes to the sky, China will join the ranks of the few nations that have developed homegrown large airliners: the U.S., Russia, Brazil, Canada, the U.K., France and Germany.

So far it's been slow-going for China's commercial aerospace ambitions. The country's state-owned airlines first signed up to buy the jet in 2010, and it was originally supposed to enter service in 2016.

The prototype wasn't unveiled until November 2015, and the project has been beset by technical delays as China learns the ropes of airliner development.

The Chinese jet's first flight will be the biggest and most visible milestone in the program. But it still has a long way to go before it's carrying passengers and competing with its U.S. and European competitors.

The aircraft will likely go through months or years of grueling certification tests, and meeting safety standards might require design changes. Comac will also need to win the trust of airlines in China and elsewhere by proving the jet can operate efficiently and reliably on scheduled flights.

Even companies with decades of experience like Boeing (BA) and Airbus (EADSF) have faced myriad delays, illustrating the challenge of bringing new jets to paying passengers.

Related: The world's new planes in 2017

China is on track to surpass the U.S. by 2030 as the world's largest commercial aviation market. The country's airlines are buying hundreds of new airliners from Airbus and Boeing each year to grow their fleets.

Boeing estimates that the country will need a trillion dollars worth of new airplanes over the next two decades. The company expects that it will need more than 5,100 that are the same size as the C919.

But don't expect to see the C919 is U.S. skies. The airliner has been almost entirely ordered by Chinese carriers for domestic flying.