The Cougars and Aztecs will square off on Nov. 30, 2019 in San Diego and on Nov. 14, 2020 in Provo.
BYU also announced Thursday that it will host McNeese State, an FCS program from the Southland Conference, in 2018. The Cougars and Cowboys will play on either Sept. 22 or Oct. 13 at LaVell Edwards Stadium; An exact date will be determined later.
BYU athletic director Tom Holmoe hinted on a San Diego sports radio station show just before the Poinsettia Bowl last December that he was having friendly discussions with SDSU officials recently, and Thursday's announcement validated those claims.
SDSU becomes the second current MWC football program to agree to play BYU since the Cougars left the league, joining UNLV. BYU has also played former MWC member Utah and relatively new MWC member Utah State.
"We are excited to renew our strong history with San Diego State in a series that has included many incredible games over the years," Holmoe said in a school news release.
BYU leads the series with SDSU 28-7-1 and most recently defeated the Aztecs 23-6 in the 2012 Poinsettia Bowl, which is now defunct.
There is some question regarding where the BYU-SDSU game in San Diego will be played because SDSU's lease with Qualcomm Stadium expires in 2018. A new contract is currently being negotiated that would extend the agreement through 2020.