Numbers 17:2

Speak unto the children of Israel, and take of every one of them a rod according to the house of their fathers, of all their princes according to the house of their fathers twelve rods: write thou every man’s name upon his rod.

Twelve rods were to be taken, one for each tribe according to its ancestral house and its princes, so that each tribal representative could be distinguished in the test of whom God had chosen for the priesthood. Every man's name was to be written upon his own rod, with Aaron's name written upon the rod for Levi. The rods were to be placed before God in the tabernacle as a test, where the blossoming of a rod would show which tribe God had chosen for the priesthood.

By God's power Aaron's rod blossomed, proving that God had appointed his house to the priesthood and settling the question of priestly authority. The rod was then preserved and kept in the tabernacle as a lasting witness and warning to later generations, to stop rebellion and complaints.