An illustration of (rooted) SPR local search. The subtree rooted at u (whose parent is v) is pruned and regrafted to the edge entering w2. Note: the lowest common ancestor of v and w2 in the tree before SPR is r.