Stocks rose on Thursday as investors speculated that the U.S. and Mexico are getting closer to a resolution over immigration issues that would delay the tariffs threatened by President Donald Trump.

The Dow Jones Industrial Average gained 181.09 points to 25,720.66, bringing its gain for the week to more than 900 points and putting it on pace for its best week of the year. The rose 0.61% to 2,843.49 while the Nasdaq Composite gained 0.53% to 7,615.55.

The talks between U.S. and Mexican officials resumed Thursday afternoon after they failed to reach an agreement on Wednesday. Martha Barcena Coqui, Mexico's ambassador to the U.S., told CNBC on Thursday that negotiators had "a very good discussion, a very good debate."

The U.S. had asked Mexico to keep Central American asylum seekers and require migrants without proper documentation to stay in Mexico "for the duration of their immigration proceedings," CNBC previously reported. The talks are poised to continue at 5:30 p.m. ET Thursday at the State Department.

Stocks hit their highs of the day after Bloomberg News reported that the U.S. is considering a postponement to Trump's 5% tariff on all Mexican imports after the country's negotiators asked for more time to hash out a deal. The tariff is set to kick in on Monday.

Shares of companies with the most to lose from Mexico tariffs pared their losses on the new headlines. Shares of Ford, GM and Kansas City Southern took a noticeable jump, though the three still finished the day lower.

Thursday's gains followed the Dow's 500-point jump on Tuesday, its second-best session of 2019. The index's subsequent 200-point climb on Wednesday and Thursday's gains have pushed its week-to-date performance up more than 3.6%. The S&P 500 and Nasdaq are up 3.3% and 2.2%, respectively, this week. Both the Dow and S&P 500 are on pace for their best weeks since November.