Also, I think the rule is you have to be within 100 miles *and* have a nexus to the border -- that is, you have to have crossed or otherwise transacted business there.
This essentially started with immigration and drug enforcement on freeways. It was a lot easier for them to pull over suspicious vehicles and search them along the 5 than to try to make a quick decision at a crowded border checkpoint.