We develop an on-line wavelength assignment (WA) algorithm for a wavelength-routed WDM tree network. The algorithm dynamically supports all$bf k$-port traffic matrices among$N$end nodes, where$bf k$denotes an integer vector$[k_1 ldots, k_N]$and end node$i, , 1leq ileq N$, can transmit at most$k_i$wavelengths and receive at most$k_i$wavelengths. Our algorithm is rearrangeably nonblocking, uses the minimum number of wavelengths, and requires at most$d^ast-1$lightpath rearrangements per new session request, where$d^ast$is the degree of the most heavily used node. We observe that the number of lightpath rearrangements per new session request does not increase as the amount of traffic$bf k$scales up by an integer factor. In addition, wavelength converters cannot reduce the number of wavelengths required to support$bf k$-port traffic in a tree network. We show how to implement our WA algorithm using a hybrid wavelength-routed/broadcast tree with only one switching node connecting several passive broadcast subtrees. Finally, using roughly twice the minimum number of wavelengths for a rearrangeably nonblocking WA algorithm, we can modify the WA algorithm to be strict-sense nonblocking.