KABUL, Afghanistan - The United Nations says 20,000 Pakistani refugees have fled to Afghanistan to avoid fighting between militants and Pakistan's military.

The UN's refugee agency says nearly 4,000 Pakistani families have fled Pakistan's Bajur tribal agency into Afghanistan's Kunar province.

Pakistan's military launched an offensive in Bajur, the most northerly of Pakistan's wild tribal regions, several of which have fallen largely under the control of militants opposed to the Afghan and Pakistani governments.

Tens of thousands of civilians have fled into other parts of Pakistan as a result of the 2-month-old offensive.

The agency says it believes the majority of those who have crossed into Afghanistan will return home once the fighting stops.