dnd 3.5e – Can the Sidestep feat be used to prevent attacks?

The lateral feat indicates the following:

Once per round, when you make an attack of opportunity, you can take a 5-foot step after attacking. This 5-foot step does not count against your limit of one step of 5 feet per round or against any movement you take in your turn.

Could this be used to avoid an attack completely? Imagine that a person moves towards you. You have a range weapon, so the enemy provokes an attack of opportunity. After this year, you take your 5-foot step. If the enemy still has movement, could they use that to get closer? Or now your movement action is spent?
If it's the latter: would a feat like the spring attack allow one to use any remaining movement to get close anyway?
If the first: What would happen if an enemy attacks you and provokes an attack of opportunity that way?