SEATTLE -

Officials say a man who refused to come down from a giant sequoia tree in Seattle will have his charges dismissed if he complies with the terms of his probation for two years.

The King County Prosecutor's Office says Cody Lee Miller was charged in King County's regional mental health court Friday with misdemeanor assault and malicious mischief charges. But, officials say, if he complies with conditions including mental health treatment and daily medication monitoring, the charges will be dismissed.

Miller was originally charged with felonies after he climbed to the top of the tree March 22 and remained there for about 25 hours, ignoring police efforts to coax him down and throwing apples and branches at responders.

The drama sparked intense interest on social media, with new Twitter accounts and the hashtag #ManInTree trending.

Miller was found not competent to stand trial and sent to Western State Hospital for several months of mental health treatment.