IRVING, Texas -- Safety C.J. Spillman has agreed to sign with the Dallas Cowboys, a source said.

Spillman, 28, a special teams player who was credited with a career-high 25 tackles last season, was cut Saturday by the San Francisco 49ers. He played 59 games for the 49ers over the last four seasons after beginning his career with the San Diego Chargers, where he played for Cowboys special teams coordinator Rich Bisaccia.

Spillman’s knowledge of the 49ers’ schemes could be useful to the Cowboys as they prepare for their season opener against San Francisco.

The Cowboys need to make a roster move to create a spot for Spillman. They'll need to do the same in regards to linebacker Korey Toomer, who has also agreed to a deal with Dallas.