Just in the nick of time.

The food-delivery startup Postmates has raised a $100 million investment just before it plans to go public, perhaps reducing the amount of money it needs to raise when it eventually lists its stock.

The new investment values Postmates at $1.85 billion, inclusive of the new cash, a person familiar with the matter told Recode, up from a valuation of around $1.2 billion that it secured in the second half of last year.

The investment includes participation from a new backer, the prominent public-market investor BlackRock, as well as Tiger Global and other current shareholders, a Postmates spokesperson said. Public-market giants are eager to invest in Silicon Valley companies when they are still private and cheaper, and the institutional backing gives some cachet to the startup when it finally hits Wall Street.

In this case, BlackRock is getting into the company in the nick of time. Postmates has hired JPMorgan Chase to underwrite its IPO , which is expected in the first half of 2019. Postmates hopes to go public at the beginning of a wave of highly-touted tech offerings that is likely to include Uber, which operates a fast-growing competitive service called Uber Eats.

Raising money on the private markets just before raising it on the public markets makes sense for companies that see an IPO as less of a financing event and more of an opportunity for marketing or for shareholders to sell their stock. And no matter when, it’s hard to turn down money when offered at a higher valuation.

Postmates has at times struggled to raise money before last year, with competitor DoorDash raising money at higher valuations. (The two longtime rivals once considered a merger .) But in September, Postmates raised $300 million at a $1.2 billion valuation, in a round led by Tiger Global, another big public-market investor.

A Delaware filing provided by the Prime Unicorn Index authorizes the company to raise up to $125 million in new cash.

Both Postmates and DoorDash also compete against other big industry players like Grubhub and Uber Eats, though all four are experiencing growth as online meal ordering continues to gain popularity. Postmates, which is most popular in Los Angeles, has been dramatically expanding its delivery regions, with its service now available in 550 cities.

In 2017, the company’s revenue grew more than 85 percent to around $250 million on nearly $900 million in total gross sales, according to a document Recode previously reported on. But the company posted an operating loss of $75 million that year. Postmates’ 2018 financial performance could not be obtained.