The Associated Press called the race at 12:40 a.m. on Wednesday.
With 91 percent of 1,661 precincts reporting, Ernst received 858,042 or 51.7 percent of the votes. Greenfield received 750,400 or 45.2 percent of the votes.
Ernst, a former Army National Guard lieutenant colonel, served in the Iowa state Senate before winning her seat in Congress in 2014, becoming the first woman to be elected to the Senate in Iowa.
She serves in Republican leadership and is a supporter of President Donald Trump.
Ernst had warned that Democrats would raise taxes and threaten economic growth by way of socialist policies.
Greenfield, a former realtor, ran for Iowa’s 3rd Congressional District in 2018, but was removed from the primary ballot after her campaign manager told her he had forged some signatures she needed to qualify.
Greenfield has focused on core Democratic issues such as guarding Social Security, increasing job training, and expanding health care options.
Other Republican incumbents have held off their Democratic challengers in the U.S. Senate race on Tuesday, including Sen. Lindsay Graham (R-S.C.) and Sen. John Cornyn (R-Texas).
Republicans currently control the Senate with a 53-seat majority in the 100-seat chamber. With the GOP holding a narrow majority, Trump was able to get not only his signature tax cuts bill in 2017, but also more than 200 judges and two Supreme Court justices, shaping the judiciary for decades to come.
Democrats need to win by four seats to take a majority, or three seats if Democratic presidential candidate Joe Biden becomes the president. In the latter case, Sen. Kamala Harris (D-Calif.) would be given a tie-breaking vote.
Democrats are defending 12 seats, while Republicans are defending 23, putting them at a disadvantage. Looking only at the seats that are likely in play, Republicans defend seven and Democrats five.
Petr Svab and The Associated Press contributed to this report.