diff --git a/haiji.cabal b/haiji.cabal
--- a/haiji.cabal
+++ b/haiji.cabal
@@ -2,7 +2,7 @@
 --  see http://haskell.org/cabal/users-guide/
 
 name:                haiji
-version:             0.3.2.0
+version:             0.3.3.0
 synopsis:            A typed template engine, subset of jinja2
 description:         Haiji is a template engine which is subset of jinja2.
                      This is designed to free from the unintended rendering result
diff --git a/src/Text/Haiji/Syntax/AST.hs b/src/Text/Haiji/Syntax/AST.hs
--- a/src/Text/Haiji/Syntax/AST.hs
+++ b/src/Text/Haiji/Syntax/AST.hs
@@ -259,19 +259,31 @@
 -- Right {% if foo %}テスト{% endif %}
 -- >>> exec "    {%- if foo -%}    テスト    {%- endif -%}    "
 -- Right (ParserState {parserStateLeadingSpaces = Nothing, parserStateInBaseTemplate = True})
+-- >>> eval "{% if foo %}テスト{% elif bar %}hoge{% endif %}"
+-- Right {% if foo %}テスト{% else %}{% if bar %}hoge{% endif %}{% endif %}
+-- >>> eval "{% if foo %}  テスト  {% elif bar %}  hoge  {% endif %}"
+-- Right {% if foo %}  テスト  {% else %}{% if bar %}  hoge  {% endif %}{% endif %}
+-- >>> eval "{% if foo -%}  テスト  {%- elif bar -%}  hoge  {%- endif %}"
+-- Right {% if foo %}テスト{% else %}{% if bar %}hoge{% endif %}{% endif %}
 --
 condition :: HaijiParser (AST 'Partially)
-condition = withLeadingSpacesOf start rest where
-  start = statement $ string "if" >> skipMany1 space >> expression
+condition = withLeadingSpacesOf (start "if") rest where
+  start kwd = statement $ string kwd >> skipMany1 space >> expression
   rest cond = do
     ifPart <- haijiParser
-    mElsePart <- mayElse
-    leadingElseSpaces <- getLeadingSpaces
-    _ <- statement $ string "endif"
-    leadingEndIfSpaces <- getLeadingSpaces
-    return $ case mElsePart of
-      Nothing       -> Condition cond (ifPart ++ maybeToList leadingEndIfSpaces) Nothing
-      Just elsePart -> Condition cond (ifPart ++ maybeToList leadingElseSpaces ) (Just $ elsePart ++ maybeToList leadingEndIfSpaces)
+    mElifPart <- option Nothing (Just <$> withLeadingSpacesOf (start "elif") rest)
+    case mElifPart of
+      Just elif -> do
+        leadingElifSpaces <- getLeadingSpaces
+        return $ Condition cond (ifPart ++ maybeToList leadingElifSpaces) (Just [elif])
+      Nothing -> do
+        mElsePart <- mayElse
+        leadingElseSpaces <- getLeadingSpaces
+        _ <- statement $ string "endif"
+        leadingEndIfSpaces <- getLeadingSpaces
+        return $ case mElsePart of
+          Nothing       -> Condition cond (ifPart ++ maybeToList leadingEndIfSpaces) Nothing
+          Just elsePart -> Condition cond (ifPart ++ maybeToList leadingElseSpaces ) (Just $ elsePart ++ maybeToList leadingEndIfSpaces)
 
 mayElse :: HaijiParser (Maybe [AST 'Partially])
 mayElse = option Nothing (Just <$> elseParser) where
diff --git a/test/condition.tmpl b/test/condition.tmpl
--- a/test/condition.tmpl
+++ b/test/condition.tmpl
@@ -19,3 +19,12 @@
 {% endif %}
 B
 {% endif %}
+
+
+{% if foo %}
+foo
+{% elif bar %}
+bar
+{% else %}
+baz
+{% endif %}
