In return, the Oilers got minor league goalie Niklas Lundstrom and a fifth-round pick in this June's draft.
The 25-year-old Nilsson, who was assigned to AHL Chicago after the trade was completed, will be a restricted free agent July 1. He has started 24 games for the Oilers this season, compiling a 10-12-2 record with a 3.14 goals-against average and a .901 save percentage.
Lundstrom, 23, appeared in 13 games for ECHL Elmira this season. He was 8-3-0 with a 2.92 GAA and .929 save percentage.