The Boston Red Sox have traded right-handed pitcher Angel Bastardo to the Kansas City Royals ahead of the Rule 5 draft deadline, according to a report by Sean McAdam of MassLive on Tuesday.

The move comes as teams finalize their 40-man rosters before the annual Rule 5 draft, which allows clubs to select certain unprotected players from other organizations. By dealing Bastardo, the Red Sox avoid potentially losing him in the draft while acquiring assets from Kansas City.

Bastardo, a pitching prospect in the Boston system, will now join the Royals organization. Specific details of the return package were not immediately disclosed.